Re: seqscan for 100 out of 3M rows, index present

From: Willy-Bas Loos <willybas(at)gmail(dot)com>
To: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: seqscan for 100 out of 3M rows, index present
Date: 2013-06-26 21:25:15
Message-ID: CAHnozTiP_6sZgcwyED6H6JsimP+=WOrWT=_QvOfCa7VS9zQ72A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Jun 26, 2013 at 11:20 PM, Willy-Bas Loos <willybas(at)gmail(dot)com> wrote:

> On Wed, Jun 26, 2013 at 10:55 PM, Sergey Konoplev <gray(dot)ru(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Willy-Bas Loos 2013-06-26 21:35:39 Re: seqscan for 100 out of 3M rows, index present
Previous Message Jeff Janes 2013-06-26 20:59:43 Re: seqscan for 100 out of 3M rows, index present