Re: [sqlite] SELECT crashes with small cache?

2007-10-09 Thread Richard Klein

Joe Wilson wrote:

--- Richard Klein <[EMAIL PROTECTED]> wrote:

I am seeing SQLite crashing during execution
of a SELECT statement when I make the page
cache very small (40 pages).

When I bump the cache up to 50 pages, the
problem goes away.

The problem only occurs on my RISC platform,
not on my x86-based platform.  Also, I am
using SQLite 2 (not 3).


I've never used the sqlite2 library, so I can't comment on that.
But sqlite3 does a lot of checking in low memory situations
and has very robust error handling and recovery.
For example, SQLite3 is the only complex library I've seen that 
can survive malloc returning NULL for no memory.


Actually, sqlite2 seems to manage quite nicely in
low memory situations, at least on my x86-based
platform:  I was able to reduce MAX_PAGES to 1,
and TEMP_PAGES to 0, and sqlite2 still seemed to
run just fine.

It's only on my SPARC-based platform that I have
any problem, and that could be due to factors
beyond sqlite2's control.  For example, there
could be a problem with the way we've redefined
malloc() and free() on that platform.

Without a decent debugger on that platform, it's
difficult to track down the problem.  However,
I'm not going to worry about it right now; instead,
I'm going to upgrade to sqlite3.  If the problem
still exists after I upgrade, then I'll worry it.

- Richard Klein


-
To unsubscribe, send email to [EMAIL PROTECTED]
-

Re: [sqlite] SELECT crashes with small cache?

2007-10-07 Thread Joe Wilson
--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> --- Richard Klein <[EMAIL PROTECTED]> wrote:
> > I am seeing SQLite crashing during execution
> > of a SELECT statement when I make the page
> > cache very small (40 pages).
> > 
> > When I bump the cache up to 50 pages, the
> > problem goes away.
> > 
> > The problem only occurs on my RISC platform,
> > not on my x86-based platform.  Also, I am
> > using SQLite 2 (not 3).
> 
> I've never used the sqlite2 library, so I can't comment on that.

It seems that I did test against sqlite 2.x once before:

 http://www.mail-archive.com/sqlite-users@sqlite.org/msg16450.html

There is more to consider other than just code size when trying to 
minimize memory usage. SQLite3 used 1/4 of the memory (temp store) as 
SQLite2 in a large bulk insert transaction.

You have to test to see what works best for your application.



   

Building a website is a piece of cake. Yahoo! Small Business gives you all the 
tools to get online.
http://smallbusiness.yahoo.com/webhosting 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SELECT crashes with small cache?

2007-10-06 Thread Joe Wilson
--- Richard Klein <[EMAIL PROTECTED]> wrote:
> I am seeing SQLite crashing during execution
> of a SELECT statement when I make the page
> cache very small (40 pages).
> 
> When I bump the cache up to 50 pages, the
> problem goes away.
> 
> The problem only occurs on my RISC platform,
> not on my x86-based platform.  Also, I am
> using SQLite 2 (not 3).

I've never used the sqlite2 library, so I can't comment on that.
But sqlite3 does a lot of checking in low memory situations
and has very robust error handling and recovery.
For example, SQLite3 is the only complex library I've seen that 
can survive malloc returning NULL for no memory.


  

Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.
http://tv.yahoo.com/ 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SELECT crashes with small cache?

2007-10-05 Thread Richard Klein

Hello all,

I am seeing SQLite crashing during execution
of a SELECT statement when I make the page
cache very small (40 pages).

When I bump the cache up to 50 pages, the
problem goes away.

The problem only occurs on my RISC platform,
not on my x86-based platform.  Also, I am
using SQLite 2 (not 3).

My RISC platform prints out the stack trace
in hex, not program symbols, so I can't yet
tell you where in SQLite I'm crashing.  (I'll
try to get more info from the vendor on how
to use their debugger.)

Anyone ever see anything like this?

Regards,
- Richard Klein

-
To unsubscribe, send email to [EMAIL PROTECTED]
-