Oooooo, pretty! I am working my way through "The Complete Reference SQL Second Edition" and the documentation, albeit slowly. I don't see a reference to LIMIT, which implies that is a SQLite, thing, yah?
I finally went the really lazy route (I have a Friday deadline, and didn't want to try experimenting with precompiled queries, right now) and created a temporary table for each new set of results. That temp table has an INTEGER PRIMARY KEY, and I jam the results into it. It has several advantages; one is that it doesn't reconduct the query the way LIMIT probably would; two, it keeps the results around for secondary processing (if I need it); three, it allows me to do TOP/LIMIT-like functionality using the rowid. Once Friday is passed, I am going to go back through and do some timing to figure out whether this is faster then doing a precompiled query, or whatever, later. I expect to see a win using precompiled queries (same number of function calls, I think) but I may still need to research inside the results, so we will see. Any advice/experience on doing it this way? --Keith -----Original Message----- From: Christian Smith [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 6:41 AM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Rowid in VIEWs? On Tue, 17 Aug 2004, Keith Herold wrote: >The short question: do (temporary) VIEW's have rowid's in SQLITE? > >A small description of the problem: > > ... On occasion, the result is quite large, and my standard way of >returning results is very slow on large result sets, so I try to break >up how many results I return. Since TOP does not exist in sqlite, I >thought I would create a temporary view using the (Key,Value) pairs in >a SELECT statement. BTW, TOP is not a standard SQL construct. The standard way to do TOP like functionality is to use LIMIT in your SELECT: http://www.sqlite.org/lang.html#select Notice the LIMIT keyword, just after the ORDER BY clause. > >--Keith > -- /"\ \ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL X - AGAINST MS ATTACHMENTS / \