pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedquery performance, where goes time?
2+ messages / 2 participants
[nested] [flat]
* query performance, where goes time?
@ 2012-09-05 21:48 Anibal David Acosta <aa@devshock.com>
0 siblings, 1 reply; 2+ messages in thread
From: Anibal David Acosta @ 2012-09-05 21:48 UTC (permalink / raw)
To: pgsql-performance
Using explain analyze I saw that many of my queries run really fast, less
than 1 milliseconds, for example the analyze output of a simple query over a
table with 5millions of records return "Total runtime: 0.078 ms"
But the real time is a lot more, about 15 ms, in fact the pgadmin show this
value.
So, where goes the others 14.2 ms?
Network transfer (TCP)?
Or analyze Total runtime don't represent the query runtime?
Thanks!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: query performance, where goes time?
@ 2012-09-06 01:26 Craig Ringer <ringerc@ringerc.id.au>
parent: Anibal David Acosta <aa@devshock.com>
0 siblings, 0 replies; 2+ messages in thread
From: Craig Ringer @ 2012-09-06 01:26 UTC (permalink / raw)
To: Anibal David Acosta <aa@devshock.com>; +Cc: pgsql-performance
On 09/06/2012 07:48 AM, Anibal David Acosta wrote:
> Using explain analyze I saw that many of my queries run really fast,
> less than 1 milliseconds, for example the analyze output of a simple
> query over a table with 5millions of records return "Total runtime:
> 0.078 ms"
>
> But the real time is a lot more, about 15 ms, in fact the pgadmin show
> this value.
>
> So, where goes the others 14.2 ms?
Client-side latency, time spent transmitting query results, and network
latency.
You'll see much less difference in queries that take more meaningful
amounts of time. This query is so fast that timing accuracy will be an
issue on some systems, and so will scheduler jitter etc.
--
Craig Ringer
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-09-06 01:26 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 21:48 query performance, where goes time? Anibal David Acosta <aa@devshock.com>
2012-09-06 01:26 ` Craig Ringer <ringerc@ringerc.id.au>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox