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

Re: Performance problem on RH7.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: csegyud(at)vnet(dot)hu
Cc: "'Alvaro Herrera'" <alvherre(at)dcc(dot)uchile(dot)cl>,"'Pgsql-General(at)Postgresql(dot)Org (E-mail)'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance problem on RH7.1
Date: 2004-06-29 05:52:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud(at)vnet(dot)hu> writes:
> Limit  (cost=30.28..30.28 rows=1 width=58) (actual time=0.19..0.19 rows=1
> loops=1)
>   ->  Sort  (cost=30.28..30.30 rows=7 width=58) (actual time=0.18..0.18
> rows=2 loops=1)
>         Sort Key: stockid, productid, changeid, date, "time"
>         ->  Index Scan using t_stockchanges_fullindex on t_stockchanges
> (cost=0.00..30.18 rows=7 width=58) (actual time=0.04..0.08 rows=6 loops=1)
>               Index Cond: ((stockid = 1) AND (productid = 234) AND (changeid
> = 1) AND (date <= '2004.06.29'::bpchar))
> Total runtime: 0.25 msec
> ( Compared to 9.17 msec !!!! 37 times faster! )

Good, but you're not there yet --- the Sort step shouldn't be there at
all.  You've still got some inconsistency between the ORDER BY and the
index.  Check my example again.

			regards, tom lane

In response to


pgsql-general by date

Next:From: Tom LaneDate: 2004-06-29 06:04:48
Subject: Re: Seeing uncommitted transactions
Previous:From: Mike CastleDate: 2004-06-29 05:51:37
Subject: Re: Multiple databases on seperate drives/file systems?

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