Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Sam Carleton
On Feb 18, 2008 11:33 AM, Scott Baker <[EMAIL PROTECTED]> wrote: > > The less database hits you have to do, the faster your code will be. > Getting all the data into a PHP data structure should be the way to go. After reading all the replies, I have to agree with Scott for my particular

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread John Stanton
Sqlite uses cacheing. I would suggest not storing large amounts of data in PHP arrays. It is buffer shadowing. Ideally with Sqlite you would use a cursor (the sqlite3_step logic) and pick up rows as you need them from the Sqlite cache. Digging a string of holes and filling them in is a

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Zbigniew Baniewski
On Mon, Feb 18, 2008 at 08:33:49AM -0800, Scott Baker wrote: > The less database hits you have to do, the faster your code will be. > Getting all the data into a PHP data structure should be the way to go. But, if one really is "loading all the data into memory at once" (just "SELECT * FROM

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Kees Nuyt
On Mon, 18 Feb 2008 11:25:16 -0500, you wrote: >I am new to SQLite and databases, so I am stil learning how to >optimize their use... > >I am working on a "shopping cart" type of feature, it is actually a >favorites feature for a system that displays images in multiple >galleries. There is a

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Scott Baker
Michael Hooker wrote: > This is an issue which interests me too. The answer Scott gives makes > absolute sense to me, but all the PHP/MySQL books I've seen (and MySQL can't > be that different from Sqlite3 in this respect) seem to go the way of a new > query to the database every time a

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Michael Hooker
implications, especially on a busy shared server. Michael Hooker - Original Message - From: "Scott Baker" <[EMAIL PROTECTED]> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Sent: Monday, February 18, 2008 4:33 PM Subject: Re: [sqlite

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Paul Smith
At 16:25 18/02/2008, you wrote: >I am new to SQLite and databases, so I am stil learning how to >optimize their use... > >I am working on a "shopping cart" type of feature, it is actually a >favorites feature for a system that displays images in multiple >galleries. There is a SQLite table that

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Scott Baker
Sam Carleton wrote: > I am new to SQLite and databases, so I am stil learning how to > optimize their use... > > I am working on a "shopping cart" type of feature, it is actually a > favorites feature for a system that displays images in multiple > galleries. There is a SQLite table that

[sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Sam Carleton
I am new to SQLite and databases, so I am stil learning how to optimize their use... I am working on a "shopping cart" type of feature, it is actually a favorites feature for a system that displays images in multiple galleries. There is a SQLite table that contains the user_id, gallery_id, and