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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 26, 2013 at 11:20 PM, Willy-Bas Loos <willybas@xxxxxxxxx> wrote:
On Wed, Jun 26, 2013 at 10:55 PM, Sergey Konoplev <gray.ru@xxxxxxxxx> 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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux