public inbox for [email protected]  
help / color / mirror / Atom feed
From: George Pavlov <[email protected]>
To: Tom Lane <[email protected]>
To: Joshua D. Drake <[email protected]>
To: [email protected]
Subject: Re: index vs. seq scan choice?
Date: Thu, 7 Jun 2007 15:52:16 -0700
Message-ID: <8C5B026B51B6854CBE88121DBF097A86DEA6D3@ehost010-33.exch010.intermedia.net> (raw)
In-Reply-To: <[email protected]>
References: <8C5B026B51B6854CBE88121DBF097A86C3A30D@ehost010-33.exch010.intermedia.net>
	<[email protected]>
	<8C5B026B51B6854CBE88121DBF097A86DEA6B4@ehost010-33.exch010.intermedia.net>
	<[email protected]>
	<8C5B026B51B6854CBE88121DBF097A86DEA6C5@ehost010-33.exch010.intermedia.net>
	<[email protected]>

> From: Tom Lane
> "George Pavlov" <[email protected]> writes:
> >> From: Joshua D. Drake [mailto:[email protected]]
> >> In those rare cases wouldn't it make more sense to just set
> >> enable_seqscan to off; run query; set enable_seqscan to on;
> 
> > 1. these cases are not that rare (to me);
> 
> It strikes me that you probably need to adjust the planner cost
> parameters to reflect reality on your system.  Usually dropping
> random_page_cost is the way to bias the thing more in favor of
> index scans.

Thanks, Tom, I will try that. Seems better than fiddling with
enable_seqscan around every query/transaction.

Joshua, I fail to understand why setting and unsetting enable_seqscan on
a per query/transaction basis is in any way preferable to query hints?
Don't get me wrong, I don't like the idea of hints, and I have read the
archives on the subject and I agree with the philosophy, but if the
optimization toolkit for routine application queries is going to include
setting config parameters that just smacks of hints by another name...

George



view thread (17+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: index vs. seq scan choice?
  In-Reply-To: <8C5B026B51B6854CBE88121DBF097A86DEA6D3@ehost010-33.exch010.intermedia.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox