|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Improving speed of a select queryFred
We're creating a system that will be doing a large number of distinct select queries against an hsqldb server from a table that will have over 1 million records. It basically scrolls through a list of ids and queries for each id...just moving through the whole list. Since the list is large, greater than 30,000 and it is querying a large table, I'm trying to determine how to improve the speed of the query. A small improvement in each query could translate into a large gain in the whole job.. Would querying using an IDENTITY field, our Index field, be quicker than using a non-identity field? Mike ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: Improving speed of a select queryQuerying should be done against an index field, otherwise each query against
a million rows may take several seconds. You should be able to join the 30,000 row list with the 1M row table, which will improve total time a lot. If you post a simplified example of the tables, I can give you more specific advice. Fred ----- Original Message ----- From: "Mike Purdy" <PurdyMi@...> To: <hsqldb-user@...> Sent: 09 October 2009 13:33 Subject: [Hsqldb-user] Improving speed of a select query Fred We're creating a system that will be doing a large number of distinct select queries against an hsqldb server from a table that will have over 1 million records. It basically scrolls through a list of ids and queries for each id...just moving through the whole list. Since the list is large, greater than 30,000 and it is querying a large table, I'm trying to determine how to improve the speed of the query. A small improvement in each query could translate into a large gain in the whole job.. Would querying using an IDENTITY field, our Index field, be quicker than using a non-identity field? Mike ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
| Free embeddable forum powered by Nabble | Forum Help |