On Aug 15, 2008, at 8:06 AM, [EMAIL PROTECTED] wrote: > Hello > > Why does SQLite consume 2.5MB memory every time when running a > statement on a attached database with LIKE operator?
This mailing list strips off attachments. Please send the database by some other means. How do you know that SQLite is "consuming" 2.5MB? What version of SQLite are you running? What operating system? Did you compile it yourself or are using using a pre-build binary? What values are us using for the "?" parameters in your queries? > > > Example 1: > SELECT fs_rec FROM fs_main WHERE fs_itemtype=? AND fs_textid > LIKE ?; // consumes <50kB RAM > > Example 2: > SELECT fs_rec FROM _job01.fs_main WHERE fs_itemtype=? AND fs_textid > LIKE ?; // consumes 2.5MB RAM > SELECT fs_rec FROM _job02.fs_main WHERE fs_itemtype=? AND fs_textid > LIKE ?; // consumes 2.5MB RAM > SELECT fs_rec FROM _job03.fs_main WHERE fs_itemtype=? AND fs_textid > LIKE ?; // consumes 2.5MB RAM > SELECT fs_rec FROM _job04.fs_main WHERE fs_itemtype=? AND fs_textid > LIKE ?; // consumes 2.5MB RAM > > Example 3: > SELECT fs_rec FROM _job01.fs_main WHERE fs_itemtype=? AND > fs_textid=?; // consumes <1KB RAM > > Memory is consumed immediately after the first sqlite3_step() is > called. > > The PRAGMA cache_size is set to 2000 on the in-memory main database. > > Regards > Daniel > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > D. Richard Hipp [EMAIL PROTECTED] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users