Skip site navigation (1) Skip section navigation (2)

voodoo planner update

From: "D(dot) Duccini" <duccini(at)backpack(dot)com>
To: Pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: voodoo planner update
Date: 2002-05-08 01:27:46
Message-ID: Pine.GSO.4.03.10205072020180.20094-100000@ra.bpsi.net (view raw or flat)
Thread:
Lists: pgsql-novice
Here's where things get interesting:

now things have flipped around!

billdate = 1 is SLOWER than billdate = any other value

# explain select s.id from subaccounts s, accounts a where a.id = s.idaccount and a.billdate = 2;
NOTICE:  QUERY PLAN:

Nested Loop  (cost=0.00..16.42 rows=2 width=12)
  ->  Index Scan using idxaccountbilldate on accounts a  (cost=0.00..2.02 rows=1 width=4)
  ->  Index Scan using idxsubprimary on subaccounts s  (cost=0.00..14.22 rows=15 width=8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# explain select s.id from subaccounts s, accounts a where a.id = s.idaccount and a.billdate = 1;
NOTICE:  QUERY PLAN:

Hash Join  (cost=79.83..310.33 rows=3506 width=12)
  ->  Seq Scan on subaccounts s  (cost=0.00..71.10 rows=3510 width=8)
  ->  Hash  (cost=76.03..76.03 rows=1520 width=4)
        ->  Seq Scan on accounts a  (cost=0.00..76.03 rows=1520 width=4)





-----------------------------------------------------------------------------
david(at)backpack(dot)com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.    
+1 651.645.9798 fax            Don't forget your BackPack!"   
-----------------------------------------------------------------------------


In response to

pgsql-novice by date

Next:From: Brian SchroederDate: 2002-05-08 02:23:08
Subject: Relation does not exist
Previous:From: D. DucciniDate: 2002-05-08 00:31:03
Subject: more voodoo planner bs :)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group