* Da Martian <[EMAIL PROTECTED]> [2006-10-25 15:05]: > Its was not meant as an insult, however you did set the tone > with your post (ala: Either you want the data from the query, > or you don't.). I mearly responded in kind. If you live in > glass houses dont throw stones and all that. I mean its not > hard to see that loading 20 million records into memory isnt > the most effient approach to showing a list box on the screen.
I suggested that after you said that Oracle collects results in memory before returning them; you seemed to hint that this wouldn’t be a problem, in which case whether you do it yourself or the database does it for you doesn’t make a difference. Solutions that come to mind are a) to populate the UI from an idle callback, where the scollbar would simply keep growing independently from any user interaction until all the results are fetched; or if that’s unacceptable, b) run a separate COUNT(*) query, since preparing a extra query is cheap, but using COUNT(*) tells SQLite that it can forgo a lot of processing, which makes the up-front counting query quicker. There are other options as well. A lot depends on your circumstances. F.ex. paged queries can be made cheaper by selecting results into a temporary table so that you can re-retrieve them with a much cheaper query. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------