Re: [PERFORM] plain inserts and deletes very slow

2005-07-08 Thread Enrico Weigelt
* Klint Gore <[EMAIL PROTECTED]> wrote: > Turn on statement logging. I've seen delphi interfaces do extra queries > on system tables to find some structure information. I'm already using statement logging of all queries taking longer than 200ms. It seems that only the INSERT takes such a time.

Re: [PERFORM] plain inserts and deletes very slow

2005-07-04 Thread Klint Gore
On Mon, 4 Jul 2005 10:59:03 +0200, Enrico Weigelt <[EMAIL PROTECTED]> wrote: > * David Mitchell <[EMAIL PROTECTED]> wrote: > > Hi, > > > Hmm, you said you don't experience this when executing the query > > manually. What adapter are you using to access postgres from your > > application? libpq,

Re: [PERFORM] plain inserts and deletes very slow

2005-07-04 Thread Alvaro Herrera
On Mon, Jul 04, 2005 at 10:57:29AM +0200, Enrico Weigelt wrote: > * Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > On Mon, Jul 04, 2005 at 02:17:47AM +0200, Enrico Weigelt wrote: > > > * David Mitchell <[EMAIL PROTECTED]> wrote: > > > > Perhaps if you are doing a lot of inserts and deletes, vacuumin

Re: [PERFORM] plain inserts and deletes very slow

2005-07-04 Thread Enrico Weigelt
* Alvaro Herrera <[EMAIL PROTECTED]> wrote: > On Mon, Jul 04, 2005 at 02:17:47AM +0200, Enrico Weigelt wrote: > > * David Mitchell <[EMAIL PROTECTED]> wrote: > > > Perhaps if you are doing a lot of inserts and deletes, vacuuming every 6 > > > minutes would be closer to your mark. Try vacuuming eve

Re: [PERFORM] plain inserts and deletes very slow

2005-07-04 Thread Enrico Weigelt
* David Mitchell <[EMAIL PROTECTED]> wrote: Hi, > Hmm, you said you don't experience this when executing the query > manually. What adapter are you using to access postgres from your > application? libpq, npgsql or something else? huh, its a delphi application ... (I didnt code it). > And wh

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread David Mitchell
Hmm, you said you don't experience this when executing the query manually. What adapter are you using to access postgres from your application? libpq, npgsql or something else? And what is your method for running the query 'manually'. Are you running it locally or from a remote machine or what?

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Alvaro Herrera
On Mon, Jul 04, 2005 at 02:17:47AM +0200, Enrico Weigelt wrote: > * David Mitchell <[EMAIL PROTECTED]> wrote: > > Perhaps if you are doing a lot of inserts and deletes, vacuuming every 6 > > minutes would be closer to your mark. Try vacuuming every 15 minutes for > > a start and see how that affe

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Enrico Weigelt
* David Mitchell <[EMAIL PROTECTED]> wrote: > Perhaps if you are doing a lot of inserts and deletes, vacuuming every 6 > minutes would be closer to your mark. Try vacuuming every 15 minutes for > a start and see how that affects things (you will have to do a vacuum > full to get the tables back

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread David Mitchell
Perhaps if you are doing a lot of inserts and deletes, vacuuming every 6 minutes would be closer to your mark. Try vacuuming every 15 minutes for a start and see how that affects things (you will have to do a vacuum full to get the tables back into shape after them slowing down as they have).

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Enrico Weigelt
* David Mitchell <[EMAIL PROTECTED]> wrote: > Did you vacuum full? > > When you do lots of inserts and deletes, dead tuples get left behind. > When you vacuum, postgres will reuse those dead tuples, but if you don't > vacuum for a long time these tuples will build up lots. Even when you > vacuu

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread David Mitchell
Did you vacuum full? When you do lots of inserts and deletes, dead tuples get left behind. When you vacuum, postgres will reuse those dead tuples, but if you don't vacuum for a long time these tuples will build up lots. Even when you vacuum in this case, the dead tuples are still there, althou

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Enrico Weigelt
* Enrico Weigelt <[EMAIL PROTECTED]> wrote: forgot to mention: + linux-2.6.9 + postgres-7.4.6 + intel celeron 2ghz + intel ultra ata controller + 768mb ram cu -- - Enrico Weigelt== metux IT service

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Steinar H. Gunderson
On Mon, Jul 04, 2005 at 12:45:37AM +0200, Enrico Weigelt wrote: > my application reads and writes some table quite often > (multiple times per second). these tables are quite small > (not more than 20 tuples), but the operations take quite a > long time (>300 ms!). Are you VACUUMing often enough?

Re: [PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Enrico Weigelt
* Steinar H. Gunderson <[EMAIL PROTECTED]> wrote: > On Mon, Jul 04, 2005 at 12:45:37AM +0200, Enrico Weigelt wrote: > > my application reads and writes some table quite often > > (multiple times per second). these tables are quite small > > (not more than 20 tuples), but the operations take quite a

[PERFORM] plain inserts and deletes very slow

2005-07-03 Thread Enrico Weigelt
Hi folks, my application reads and writes some table quite often (multiple times per second). these tables are quite small (not more than 20 tuples), but the operations take quite a long time (>300 ms!). The query operations are just include text matching (=) and date comparison (<,>). I w