pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Top-k apad <topkapad@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Variation between query runtimes
Date: Sun, 11 Jun 2006 09:35:20 +0300
Message-ID: <5809b390606102335j41f734d8j@mail.gmail.com> (raw)

Hi,

I have the following quering plans:

"Seq Scan on ind_uni_100 (cost=0.00..27242.00 rows=1000000 width=104)
(actual time=0.272..2444.667 rows=1000000 loops=1)"
"Total runtime: 4229.449 ms"

and

"Bitmap Heap Scan on ind_uni_100  (cost=314.00..18181.00 rows=50000
width=104) (actual time=74.106..585.368 rows=49758 loops=1)"
"  Recheck Cond: (b = 1)"
"  ->  Bitmap Index Scan on index_b_ind_uni_100
(cost=0.00..314.00rows=50000 width=0) (actual time=
61.814..61.814 rows=49758 loops=1)"
"        Index Cond: (b = 1)"
"Total runtime: 638.787 ms"

from pg_stast_get_blocks_fetched i can see that both queries need almost the
same number of disk fetches which is quite reasonable ( the index is
unclustered).

But as you can see there is a great variation between query
runtimes.Cansomeone explain this differnce?

Thanks!

view thread (2+ messages)  latest in thread

Message-ID: <5809b390606102335j41f734d8j@mail.gmail.com>
Permalink:  ../5809b390606102335j41f734d8j@mail.gmail.com/
Also on:    postgresql.org/message-id/5809b390606102335j41f734d8j@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: topkapad@gmail.com
  Subject: Re: Variation between query runtimes
  In-Reply-To: <5809b390606102335j41f734d8j@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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