Hi All,
I actually found the issue, it was with the pre_processor settings we were
using. We were using TEMP_STORE=3 (older version SQLite - 3.5.4), which
enforced memory being used by the SQLite to process the resultset. I changed
it to 2 and then used pragma options to set it to 1 where we are processing
bulk resultsets. TEMP_STORE as 2 actually helps in faster query processing,
hence we were using it earlier.

And BTW, we narrowed down the Memory Usage only when processing the
resultsets it was growing till 1.2 GB of memory and was quite visible. After
the resultset was processed the memory usage came back to normal.

Does anyone know how sqlite3_get_table works in the above scenario, does it
load up the memory as such.

Thanks for all your help,

Regards,
Jay.

On Sat, Dec 6, 2008 at 7:23 PM, Jay A. Kreibich <[EMAIL PROTECTED]> wrote:

> On Sat, Dec 06, 2008 at 03:53:42AM -0800, Roger Binns scratched on the
> wall:
> > J Jayavasanthan wrote:
>
> > > I thought that only the sqlite3_get_table function was supposed to
> fetch the
> > > rows in the memory, am I wrong or I missed some PRE_PROCESSOR while
> > > compiling the static library which resulted in such an issue,
> >
> > Your understanding of how SQLite works is correct - it calculates each
> > result row on demand.
>
>   The cost of calculating that row varies, however.  If the query has an
>  ORDER BY or GROUP BY clause over a non-indexed column, the system has
>  little choice but to materialize large parts of the query in order to
>  perform the appropriate calculations.
>
>  The specifics are very dependent on both the query and the schema.
>
>   -j
>
> --
> Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
> "Our opponent is an alien starship packed with atomic bombs.  We have
>  a protractor."   "I'll go home and see if I can scrounge up a ruler
>  and a piece of string."  --from Anathem by Neal Stephenson
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to