I was using in R2016b the following code to connect to an oracle database:
>> conn = database.ODBCConnection(prod,serv,pswd); >> setdbprefs('FetchInBatches','yes') >> setdbprefs('FetchBatchsize','10000') >> data = runsqlscript(conn,'SQL_query.sql');
It used to take 2 seconds.
Now that I tried to run it in R2018a it doesn't recognize the 'FetchInBatches' or 'FetchBatchsize' commands so I'm just running the code as
>> conn = database(prod,serv,pswd); % aparently .ODBCConnection syntaxis is depricated
>> data = runsqlscript(conn,'SQL_query.sql');
The query takes 3 minutes now!
I haven't been able to find in the documentation how to make my query faster. Could you please let me know how to fix this and make my query run fast again?
Best Answer