Re: seqscan for 100 out of 3M rows, index present - Mailing list pgsql-performance

From Willy-Bas Loos
Subject Re: seqscan for 100 out of 3M rows, index present
Date
Msg-id CAHnozTiP_6sZgcwyED6H6JsimP+=WOrWT=_QvOfCa7VS9zQ72A@mail.gmail.com
Whole thread Raw
In response to seqscan for 100 out of 3M rows, index present  (Willy-Bas Loos <willybas@gmail.com>)
List pgsql-performance
On Wed, Jun 26, 2013 at 11:20 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
On Wed, Jun 26, 2013 at 10:55 PM, Sergey Konoplev <gray.ru@gmail.com> wrote:


These are plans of two different queries. Please show the second one
(where d2, g2, etc are) with secscans off.


yes, you're right sry for the confusion.
here's the plan with enable_seqscan=off for the same quer as the OP. (same deal though)

Aggregate  (cost=59704.95..59704.96 rows=1 width=0) (actual time=41.612..41.613 rows=1 loops=1)
  ->  Nested Loop  (cost=0.00..59701.99 rows=1184 width=0) (actual time=40.451..41.591 rows=17 loops=1)
        ->  Index Scan using g_blok on g2  (cost=0.00..1290.24 rows=494 width=8) (actual time=40.209..40.472 rows=121 loops=1)

              Index Cond: (k = 1942)
        ->  Index Scan using d_gid on d2  (cost=0.00..117.62 rows=50 width=8) (actual time=0.008..0.008 rows=0 loops=121)
              Index Cond: (gid = g2.gid)
Total runtime: 41.746 ms

Cheers,

WBL

forgot the list
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth

pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: seqscan for 100 out of 3M rows, index present
Next
From: Willy-Bas Loos
Date:
Subject: Re: seqscan for 100 out of 3M rows, index present