pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Pierre Pelletier <pelletier_32@sympatico.ca>
To: John Arbash Meinel <john@arbash-meinel.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Queries 15 times slower on 8.1 beta 2 than on 8.0
Date: Thu, 22 Sep 2005 18:28:29 -0400
Message-ID: <BAYC1-PASMTP02016A006E41387CB3337B95970@CEZ.ICE> (raw)
References: <BAYC1-PASMTP01EE67AD3A0034394D85D895970@CEZ.ICE>
	<433326A6.8010708@arbash-meinel.com>
	<BAYC1-PASMTP0276B50280C40ABC9BBCB495970@CEZ.ICE>
	<43332A24.8000809@arbash-meinel.com>

With enable-seq-scan = off, it runs in 350 ms so better than 484 ms
but still much slower than 32 ms in 8.0.1.

==============================================

    Table "public.content"
   Column   |  Type   | Modifiers
------------+---------+-----------
 contentid  | integer | not null
 supplierid | integer |
 priceid    | integer |

                      Table "public.price"
        Column         |              Type              | Modifiers
-----------------------+--------------------------------+-----------
 priceid               | integer                        | not null
 itemid                | integer                        |
 supplierid            | integer                        |
 locationid            | smallint                       |
 fromdate              | date                           |
 unitvalue             | numeric                        |
 insertedbypersonid    | integer                        |
 lastupdatedbypersonid | integer                        |
 inserttimestamp       | timestamp(0) without time zone |
 lastupdatetimestamp   | timestamp(0) without time zone |
Indexes:
    "price_pkey" PRIMARY KEY, btree (priceid)

                                       Table "public.supplier"
       Column        |              Type              | 
Modifie
rs
---------------------+--------------------------------+-------------------------
---------------------
 supplierid          | integer                        | not null default 
nextval
('SupplierId'::text)
 supplierdescription | character varying(50)          | not null
 inserttimestamp     | timestamp(0) without time zone | default now()
 approvaldate        | date                           |
Indexes:
    "Supplier Id" PRIMARY KEY, btree (supplierid)
    "Supplier Description" UNIQUE, btree (upper(supplierdescription::text))
    "Supplier.InsertTimestamp" btree (inserttimestamp)
Check constraints:
    "Supplier Name cannot be empty" CHECK (btrim(supplierdescription::text) 
<> ''::tex

================================================================================


Explan analyze with enable-seq-scan = off on 8.1 beta2
                                                                 QUERY PLAN

--------------------------------------------------------------------------------
------------------------------------------------------------
 Merge Left Join  (cost=100000005.60..101607964.74 rows=1 width=0) (actual 
time=
729.067..729.078 rows=1 loops=1)
   Merge Cond: ("outer".priceid = "inner".priceid)
   ->  Sort  (cost=100000005.60..100000005.60 rows=1 width=4) (actual 
time=0.064
..0.067 rows=1 loops=1)
         Sort Key: c.priceid
         ->  Nested Loop Left Join  (cost=100000000.00..100000005.59 rows=1 
widt
h=4) (actual time=0.038..0.049 rows=1 loops=1)
               ->  Seq Scan on content c  (cost=100000000.00..100000001.01 
ro
ws=1 width=8) (actual time=0.008..0.011 rows=1 loops=1)
               ->  Index Scan using "Supplier Id" on supplier s 
(cost=0.00..4.5
6 rows=1 width=4) (actual time=0.016..0.019 rows=1 loops=1)
                     Index Cond: ("outer".supplierid = s.supplierid)
   ->  Index Scan using "Price Id" on price p  (cost=0.00..1606505.44 
rows=58147
5 width=4) (actual time=0.008..370.854 rows=164842 loops=1)
 Total runtime: 729.192 ms

----- Original Message ----- 
From: "John Arbash Meinel" <john@arbash-meinel.com>
To: "Jean-Pierre Pelletier" <pelletier_32@sympatico.ca>
Cc: <pgsql-performance@postgresql.org>
Sent: Thursday, September 22, 2005 6:03 PM
Subject: Re: [PERFORM] Queries 15 times slower on 8.1 beta 2 than on 8.0





view thread (21+ messages)  latest in thread

Message-ID: <BAYC1-PASMTP02016A006E41387CB3337B95970@CEZ.ICE>
Permalink:  ../BAYC1-PASMTP02016A006E41387CB3337B95970@CEZ.ICE/
Also on:    postgresql.org/message-id/BAYC1-PASMTP02016A006E41387CB3337B95970@CEZ.ICE

 · 

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: pelletier_32@sympatico.ca, john@arbash-meinel.com
  Subject: Re: Queries 15 times slower on 8.1 beta 2 than on 8.0
  In-Reply-To: <BAYC1-PASMTP02016A006E41387CB3337B95970@CEZ.ICE>

* 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