Re: execution time for first INSERT

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Sergio Mayoral <mayoralstuttgart(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: execution time for first INSERT
Date: 2011-07-09 00:40:23
Message-ID: 1310172023.5376.4.camel@jdavis-ux.asterdata.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 2011-07-08 at 04:23 -0700, Sergio Mayoral wrote:
> this must be something with the parser stage and since i am doing
> every time the same queries, I would like to know if there is a way to
> cache these queries in order to speed up the first INSERT.

I doubt it's the parser.

Seeing as it's around a couple ms at minimum, it's probably some kind of
IO latency. You could see that by wrapping the statements in a big
transaction (BEGIN/END block) -- I bet the inserts go very quickly and
the final commit takes longer.

Regards,
Jeff Davis

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Clem Dickey 2011-07-09 01:33:15 Re: GROUP BY with reasonable timings in PLAN but unreasonable execution time
Previous Message Jonathan 2011-07-08 22:23:41 Re: Slow query when using ORDER BY *and* LIMIT