Matlab ODBC SQL Server query so slow

I am new to Matlab, coming from an R background. I run a query via odbc similar to what I do in R, but in matlab it's extremely slow. I want to understand why this is? One thing to note is my data returns DateTimes, Strings, and Numeric types. Here is some sample code:
conn = database.ODBCConnection('DSN', 'USER', 'PASS');
query = 'select DateTimeStamp, Name, Value from ABC';
curs = exec(conn, query);
setdbprefs('DataReturnFormat','table');
curs = fetch(curs);
myobj = curs.Data;
close(curs);
Any ideas?

Answers (0)

Products

Asked:

on 4 Jul 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!