Forum

General discussion on using the Kognitio Analytical Platform.
Contributor
Offline
User avatar
Posts: 386
Joined: Thu May 23, 2013 4:48 pm

How can I reduce compile time for simple queries?

by markc » Fri Dec 06, 2013 11:56 am

I have a small number of relatively simple queries which we are trying to optimise. Is there anything we can do to reduce the compile time for these queries, as it is a significant portion of the total query time?
Reply with quote Top
Contributor
Offline
User avatar
Posts: 386
Joined: Thu May 23, 2013 4:48 pm

Re: How can I reduce compile time for simple queries?

by markc » Fri Dec 06, 2013 11:58 am

You could try using the following steps to get a query compiled once, then executed for lots of different parameter settings using the standard SQLPrepare/SQLExecute calls in the ODBC API, rather than using SQLExecDirect which will cause the query to be compiled each time:
1) SQLPrepare
2) binding of parameters
3) SQLExecute
4) Go back to step 2 and keep repeating for different parameter values

Regards,
Mark.
Reply with quote Top
Single Poster
Offline
User avatar
Posts: 1
Joined: Fri Jan 02, 2015 4:38 pm

Re: How can I reduce compile time for simple queries?

by sajid7 » Fri Jan 02, 2015 4:43 pm

I subsequently found that the reason for this error (in this case) was that the data in my file did not match the columns in the table I was trying to load it into.
When creating wcb files with a Kognitio export a create table statement is added to the file by default. There is a useful command line utility called wxcrackwcb (distributed with Kognitio) that can be used to display this information so you can obtain the create the appropriate table structure for your data
yellow
Reply with quote Top

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

cron