Dennis Cote wrote: > John Elrick wrote: > >> I have a question for the SQLite experts here as to the most efficient >> way to retrieve the following: >> >> SNIP > John, > > Do you mean the last rowid, or do you really mean the last revision? > >
Last rowid. Rowid will be a key linking to other tables. SNIP > > >> My concern is that the queries above are suboptimal and will become a >> performance impediment to the application. Can anyone recommend a more >> efficient method of retrieving the data? >> >> > > What makes you think these queries are sub-optimal? They will both use > the index to find the correct revision number, and then use the index to > find the matching row. Because they must locate the MAX value which to my mind requires more "work" to be done that a simple: select rowid from foo where parent_id = :parentId and child_id = :childId and then stepping the first row and discarding the rest...but I could be wrong which is why I was asking<g> John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users