Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Re: Re: Would you use SQLite?

by Matts (Deacon)
on Mar 06, 2002 at 07:38 UTC ( #149628=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Would you use SQLite?
in thread Would you use SQLite?

Also if you do a prepare outside your loop followed by the execute with placeholders inside the loop, you'll see an eensy weeny tiny bit of a performance boost, because I don't have to keep re-parsing the SQL.

But no, all memory leaks appear to be cleared up now.

And I'll look into the NDEBUG issue - thanks!

Replies are listed 'Best First'.
Re: Re: Re: Re: Would you use SQLite?
by SwellJoe (Scribe) on Mar 06, 2002 at 20:02 UTC
    Already have the prepare outside the loop (I tend to read lots before I try something new--SQL and DBI were entirely new to me, so I read all 5 or so posts by you on the subject as well as all of the SQLite page ;-).

    The NDEBUG thing is here: Database Speed Comparison

    The specific line is:

    SQLite version 2.0-alpha-2 was compiled with -O2 optimization and with the -DNDEBUG=1 compiler switch. Setting the NDEBUG macro is very important in SQLite version 2.0. SQLite 2.0 contains some expensive "assert()" statements in the inner loop of its processing. Setting the NDEBUG macro makes SQLite 2.0 run nearly twice as fast.

    This may already be set by default now, but everything I could find in the makefiles indicates it is not. So, DBI::SQLite might get a nice little speed boost for next to nothing. But even if not, it is already plenty fast so far for my application. The client side CGI script has gotten slower, by quite a lot (as it has to connect to the DB and whatever else goes into starting up). It takes it a good three seconds to begin working, but once it is producing results it goes at a very zippy pace. So no complaints here.

    Thanks for the additional info on the possibility of leaks. And thanks a ton for the module--it works great, and was very easy to install and program (I guess DBI gets the credit for programmability--but you did a great job packaging SQLite into a module/DBD).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://149628]
[shmem]: saying "biking itself isn't that much, but getting up and down - hell!"
[shmem]: up and down: on and off the bike, of course

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-06-25 20:16 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (570 votes). Check out past polls.