TomJohnRiddle

15 Reputation

One Badge

12 years, 17 days

MaplePrimes Activity


These are replies submitted by TomJohnRiddle

@dohashi Thanks for input. It's Microsoft SQL Server 2008, table contains mix of character data types (nvarchar) and approximate-number data types (float). As for CPU utilization it's near to zero (if network was the problem refreshing connections in excel or R should take as long as in Maple).

If you are interested and have possibility you can install MS SQL Server 2008 (180-day free evaluation version). Put some data (maybe stock returns) in the table and check how long it will take maple to gather the data (with simple query like 'SELECT TOP 100 * FROM MYTABLE'). I don't think that long execution time is problem with my 'local' configuration, it may be issue in Maple itself.

@dohashi Thanks for input. It's Microsoft SQL Server 2008, table contains mix of character data types (nvarchar) and approximate-number data types (float). As for CPU utilization it's near to zero (if network was the problem refreshing connections in excel or R should take as long as in Maple).

If you are interested and have possibility you can install MS SQL Server 2008 (180-day free evaluation version). Put some data (maybe stock returns) in the table and check how long it will take maple to gather the data (with simple query like 'SELECT TOP 100 * FROM MYTABLE'). I don't think that long execution time is problem with my 'local' configuration, it may be issue in Maple itself.

I have tried abovementioned method: „SelectMethod=direct”. With SelectMethod=cursor, SQL query which returns 136x6 matrix is executing 26 seconds. With SelectMethod=direct query is executing 24 seconds. The same query in MS SQL executes immediately. Moreover the same query in R (using RODBC package):

library(RODBC)

dbhandle <- odbcDriverConnect('driver={SQL Server};server=SERVER;database=MYDATABASE;trusted_connection=true')

res <- sqlQuery(dbhandle, 'MYQUERY)

is immediate.

I really don’t know why it takes so long in Maple to gather data...

I have tried abovementioned method: „SelectMethod=direct”. With SelectMethod=cursor, SQL query which returns 136x6 matrix is executing 26 seconds. With SelectMethod=direct query is executing 24 seconds. The same query in MS SQL executes immediately. Moreover the same query in R (using RODBC package):

library(RODBC)

dbhandle <- odbcDriverConnect('driver={SQL Server};server=SERVER;database=MYDATABASE;trusted_connection=true')

res <- sqlQuery(dbhandle, 'MYQUERY)

is immediate.

I really don’t know why it takes so long in Maple to gather data...

Darin, big thanks for comment. The first thing I’ve checked was if I have the latest JDBC driver (I do). As for selectmethod=direct, that was my initial idea as well, but I couldn’t make maple to connect with database using that method. Maybe I’ve wrongly assumed that it is impossible. On Monday I will try to use instead of:

“jdbc:driver://localhost/DbName”

This one:

“jdbc:driver//localhost/DbName;SelectMetod=direct”

If it will work, it would be great!

Darin, big thanks for comment. The first thing I’ve checked was if I have the latest JDBC driver (I do). As for selectmethod=direct, that was my initial idea as well, but I couldn’t make maple to connect with database using that method. Maybe I’ve wrongly assumed that it is impossible. On Monday I will try to use instead of:

“jdbc:driver://localhost/DbName”

This one:

“jdbc:driver//localhost/DbName;SelectMetod=direct”

If it will work, it would be great!

I've checked in MS SQL activity monitor that query is executed almost immediately in MS SQL, but then it waits for about 40 second to close cursor. But...why?

@Will Yes. In MS SQL it takes less than one second.

@Carl Love Hi! Thank you for your prompt reply. I've been able to check only CPU utilization (which is 1%) and NET utilization which is close to 0%. As for Disk Utilization I am waiting for access to Windows resourse monitor.

Page 1 of 1