Matlab ODBC SQL Server query so slow
Show older comments
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)
Categories
Find more on Database Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!