pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sarlav kumar <sarlavk@yahoo.com>
To: pgsql-performance@postgresql.org
Subject: Re: help needed -- sequential scan problem
Date: Mon, 22 Nov 2004 11:41:25 -0800 (PST)
Message-ID: <20041122194125.8040.qmail@web51302.mail.yahoo.com> (raw)
In-Reply-To: <16679.1100927986@sss.pgh.pa.us>

Hi Tom,
 
Thanks for the help, Tom.
 
>The major issue seems to be in the sub-selects:

> -> Seq Scan on merchant_purchase mp (cost=0.00..95.39 rows=44 width=4) (actual time=2.37..2.58 rows=6 loops=619)
> Filter: (merchant_id = $0)
>where the estimated row count is a factor of 7 too high. If the
>estimated row count were even a little lower, it'd probably have gone
>for an indexscan.
 
I understand that the sub-selects are taking up most of the time as they do a sequential scan on the tables.  
 
 >You might get some results from increasing the
>statistics target for merchant_purchase.merchant_id. 
 
Do I have to use vacuum analyze to update the statistics? If so, I have already tried that and it doesn't seem to help.
 
>If that doesn't help, I'd think about reducing random_page_cost a little bit.
 
I am sorry, I am not aware of what random_page_cost is, as I am new to Postgres. What does it signify and how do I reduce random_page_cost? 

Thanks,
Saranya

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

view thread (6+ messages)  latest in thread

Message-ID: <20041122194125.8040.qmail@web51302.mail.yahoo.com>
Permalink:  ../20041122194125.8040.qmail@web51302.mail.yahoo.com/
Also on:    postgresql.org/message-id/20041122194125.8040.qmail@web51302.mail.yahoo.com

 · 

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: sarlavk@yahoo.com
  Subject: Re: help needed -- sequential scan problem
  In-Reply-To: <20041122194125.8040.qmail@web51302.mail.yahoo.com>

* 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