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

George Pavlov wrote:
>> 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);

I find that surprising.

> 
> 2. setting enable_seqscan (in JDBC, say) from the application makes the
> whole thing quite a mess (need to do a batch of statements: each query
> wrapped in its enable/disable seq scan?) -- ideally, one would like to
> issue mostly SQL statements, not config parameters from the application;

Uh no. You do it at the beginning of the transaction, run your queries 
then reset it right before (or after) commit.

> 
> 3. if this is the recommended suggestion on how to run queries then why
> don't we just add HINTS to the system and be done with it...

I suggest you read the archives, twice, before suggesting hints.

> 
> 
> 
> 


-- 

       === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/




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: <[email protected]>

* 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