Re: Queries 15 times slower on 8.1 beta 2 than on 8.0

From: "Jean-Pierre Pelletier" <pelletier_32(at)sympatico(dot)ca>
To: "John Arbash Meinel" <john(at)arbash-meinel(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Queries 15 times slower on 8.1 beta 2 than on 8.0
Date: 2005-09-22 22:28:29
Message-ID: BAYC1-PASMTP02016A006E41387CB3337B95970@CEZ.ICE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)arbash-meinel(dot)com>
To: "Jean-Pierre Pelletier" <pelletier_32(at)sympatico(dot)ca>
Cc: <pgsql-performance(at)postgresql(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tomeh, Husam 2005-09-22 22:37:14 Re: Queries 15 times slower on 8.1 beta 2 than on 8.0
Previous Message eVl 2005-09-22 22:27:16 optimization downgrade perfomance?