Re: [PHP] SQLITE

From: Chris Shiflett (shiflett_at_php.net)
Date: 11/22/03


Date: Sat, 22 Nov 2003 14:57:16 -0800 (PST)
To: "Bronislav_Klučka" <Bronislav.Klucka@pro2-soft.com>, PHP DB Konference <php-db@lists.php.net>, PHP Konference <php-general@lists.php.net>


--- Bronislav_Klučka <Bronislav.Klucka@pro2-soft.com> wrote:
> Hi, I've got questions:

I only noticed one.

> I've got sqlite like PHP module (under windows). I tried this:
> a)execute script 1 (selecting from some table), it tooks 2 minutes
> b)execute script 2 , it tooks 3 minutes
> c)execute them both at the same time (from different browser
> windows), both of them stopped also at the same time and it tooks
> 5 minutes

[snip]

> Is this some feature of sqlite or an I doing something wrong?

Without seeing any code or being given any details, all I can make is an
educated guess. SQLite uses the filesystem for storage. If your queries
are needing to access the same file (maybe you're querying the same
table), SQLite is going to serialize those queries to help you avoid
threading problems. So, your queries are going to basically take turns.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/
RAMP Training Courses
     http://www.nyphp.org/ramp



Relevant Pages

  • Re: Why the difference in these 2 SQLite files?
    ... I have a large SQLite db file, which I make on a work PC ... I now make a trivial change ... I then run the same queries again and they are a lot faster, ... with the low level file properties ...
    (microsoft.public.vb.general.discussion)
  • Why the difference in these 2 SQLite files?
    ... I have a large SQLite db file, which I make on a work PC with VBA/VB6. ... I then run the same queries again and they are a lot faster, ... Apart from that trivial change the files are otherwise exactly the same and the SQLite query plans for both queries are the same. ... As this problem somehow seems to have to do with the low level file properties ...
    (microsoft.public.vb.general.discussion)
  • Re: Why the difference in these 2 SQLite files?
    ... I have a large SQLite db file, which I make on a work PC ... I now make a trivial change ... I then run the same queries again and they are a lot faster, ... with the low level file properties ...
    (microsoft.public.vb.general.discussion)
  • Re: Yup, its call SQLite! :-)) Re: Is there a One True Postgresinterface? Is Ruby-postgresma
    ... One example is that SQLite uses a very different typing system. ... That may cause errors in many queries ... but I don't consider it to be a relational database. ...
    (comp.lang.ruby)