On Sun, Mar 1, 2009 at 4:43 PM, Mike Yenco <m...@yenco.com> wrote:
>
> On Mar 1, 2009, at 5:18 PM, P Kishor wrote:
>
>> It is going to get even more complicated and soon approach Igor-level
>> of complexity. So, for sanity's sake, it would probably be done better
>> in your application.
>
> Thanks for the explanation.
>
> Yeah, as I said in one of my previous emails, my first inclination was to
> set this up in a repeat loop in my project with individual calls to SQLite
> for each "container".

Mike,

You don't have to make repeat calls to SQLite. Depending on the size
of your dataset, you can grab entire chunks for your use, and then
iterate over them in your application. Of course, this won't work if
you are on some single-chip, EPROM type hardware with only assembly
and 5K of RAM available to you. I am talking about a normal PC type
situation here.

Also, balance the complexity and repetition of SQLite calls with your
own sanity. Trust me -- SQLite will not complain if you send
inefficient or repetitive queries to it. The CPU might warm up a
little, but for the most part, premature optimization is a serious
waste of time.

There are frequently questions on this list that ask what all should
be considered to make a very efficient application with 5000 rows in
the dataset, or something pointless like that. In most of those
situations, going ahead an building the app would probably yield
better insight than asking the list without trying something first.

SQLite is a terrific little datastore, quickly and faithfully
returning what you put into it. Most of the manipulation of the data,
esp. for display purposes, is best done in the application.

Good luck.


>
> I just wanted to make sure there wasn't some more efficient way to do it
> with a single SQLite call.  Turns out there is based on the result Martin
> came up with, but the complexity... and added complexity you suggest I would
> run into going forward if I want to do more.... definitely seems to work
> against any benefit it might have had.  So I think, for sanity's sake (er...
> might already be too late for that :-)  I'll take a break, take a couple of
> aspirin and then I'll go with my first impulse and just chalk this up as a
> nice diverting (slightly headache inducing) learning experience.
>
> -Mike
>



-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from: Madison WI United States.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to