From: Pallav Kalva <pkalva@deg.cc>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PERFORM <pgsql-performance@postgresql.org>
Subject: Re: Poor Performance on Postgres 8.0
Date: Fri, 28 Jan 2005 16:57:32 -0500
Message-ID: <41FAB54C.7050506@deg.cc> (raw)
In-Reply-To: <26388.1106948064@sss.pgh.pa.us>
References: <41FA5726.7040502@deg.cc>
<2581.1106929396@sss.pgh.pa.us>
<41FA6F29.9060009@deg.cc>
<8990.1106931750@sss.pgh.pa.us>
<41FA8697.1030200@deg.cc>
<22896.1106941715@sss.pgh.pa.us>
<41FA992B.2090405@deg.cc>
<25930.1106945442@sss.pgh.pa.us>
<41FAA76B.7070704@deg.cc>
<26388.1106948064@sss.pgh.pa.us>
The random_page_cost value is same on both the versions, the only thing
difference between 7.4 version and 8 version is that 7.4 ver has 100k
less records. For, now i created index on numericvalue column on
attribute table and it used that index and it is much faster that way.
it came down to 24msec.
Also, i tried to see the matching id for squarefeet in attribute table
there are 800 some records in attribute table for 8 version and 700
something in 7.4 version.
Tom Lane wrote:
>Pallav Kalva <pkalva@deg.cc> writes:
>
>
>>On 8
>> common | attribute | fknamestringid | 0 | 4
>>| 80 | {2524,2434,2530,2522,2525,2523,2527,2526,2574,2531} |
>>{0.219333,0.199333,0.076,0.0643333,0.0616667,0.05,0.0453333,0.042,0.04,0.0286667}
>>| {2437,2528,2529,2538,2539,2540,2554,2562,2575,2584,2637} | 0.0274016
>>
>>
>
>Given those stats, the planner is going to estimate that about 1/80th of
>the attribute table matches any particular fknamestringid, and that's
>what's driving it away from using the indexscan. I cannot tell whether
>there are indeed a couple of thousand rows joining to the 'squareFeet'
>string row (in which case the condition numericValue='775.0' must be
>really selective) or whether this is an outlier case that joins to just
>a few attribute rows.
>
>The slightly different stats values for 7.4 would have given it a
>slightly lower value for the cost of an indexscan by
>idx_attribute_fknamestringid, but certainly not as low as your original
>message shows. Perhaps you have some difference in parameter settings
>in your 7.4 installation --- most likely a lower random_page_cost.
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>
>
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: pkalva@deg.cc, tgl@sss.pgh.pa.us
Subject: Re: Poor Performance on Postgres 8.0
In-Reply-To: <41FAB54C.7050506@deg.cc>
* 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