On 11/19/08, Christophe Leske <[EMAIL PROTECTED]> wrote:
>
>  > I don't know. Have you run an experiment to see for yourself?
>  >
>
> Yes, but my results are inconclusive.

would you like to share your results? If you timed two tasks,
comparing their timing would be inconclusive *only* if there was a
tie.


>
>  Currently, i am doing this:
>
>  drop table idlookup;create temp table idlookup as select id from (select
>  statement for temporary result set)
>
>
>  Thus the statement is shorter than
>
>  create temp table if not exists idlookup (id integer);insert into
>  idlookup id=select id from (select statement for temporary result set)
>
>

Length of statement has nothing to do with being quicker, or, for that
matter, being better.

>  My thought was that by using "replace" after the table has been created,
>  i could simply expand it (if there are more results than used to be in
>  the table).
>  This is all fine for that case, but if the new result set has LESS
>  results than the previous one, then I end up with a temporary table
>  holding the new result set and leftovers from the previous one...
>
>

Why don't you just do a

DELETE FROM table;

and start inserting new results? (end result is the same as dropping
and then recreating the table, but you wouldn't know).

As I referenced in an earlier email, when in doubt, try. When try
fails, then ask, but don't worry about saving space and time when
those may not really be the constraining factors. Instead, worry about
getting your application right, that is, doing what you want it to do
without having unintended consequences such as rebooting your computer
or flushing your toilet. Once everything is working, then work slowly
and carefully to make things faster better cheaper.



>  --
>  Christophe Leske
>
>  www.multimedial.de - [EMAIL PROTECTED]
>  http://www.linkedin.com/in/multimedial
>  Lessingstr. 5 - 40227 Duesseldorf - Germany
>  0211 261 32 12 - 0177 249 70 31
>
>
>  _______________________________________________
>
> sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to