> -Message d'origine-
> De : Tom Lane [mailto:[EMAIL PROTECTED]
> Envoyé : mercredi, février 15, 2006 17:47
> À : Daniel Caune
> Cc : Andrew Sullivan; pgsql-sql@postgresql.org
> Objet : Re: [SQL] How to force PostgreSQL using an index
>
> "Daniel
> "Owen Jacobson" <[EMAIL PROTECTED]> writes:
> > On Wed, Feb 15, 2006 at 04:58:54PM -0500, Daniel Caune wrote:
> >> I see, but that doesn't explain whether it is possible to specify
the
> >> index to use. It seems that those options just force PostgreSQL
using
> >> another plan.
>
> > Drop the
"Owen Jacobson" <[EMAIL PROTECTED]> writes:
> On Wed, Feb 15, 2006 at 04:58:54PM -0500, Daniel Caune wrote:
>> I see, but that doesn't explain whether it is possible to specify the
>> index to use. It seems that those options just force PostgreSQL using
>> another plan.
> Drop the simple index an
> > > > Is there a way to force PostgreSQL using an index for a SELECT
> > > > statement?
> > >
> > > Your best bet is to do
> > >
> > > set enable_indexscan=false;
> > >
> > > and then do the EXPLAIN ANALYSE for your select.
> >
> > I see, but that doesn't explain whether it is possible to speci
"Daniel Caune" <[EMAIL PROTECTED]> writes:
> SELECT
> FROM GSLOG_EVENT
> WHERE EVENT_NAME = 'player-status-update'
> AND EVENT_DATE_CREATED >=
> AND EVENT_DATE_CREATED <
> I have an index on EVENT_DATE_CREATED that does it job. But I though
> that I can help my favourite PostgreSQL
On Wed, Feb 15, 2006 at 05:26:57PM -0500, Daniel Caune wrote:
> I have an index on EVENT_DATE_CREATED that does it job. But I though
> that I can help my favourite PostgreSQL if I create a composite index on
> EVENT_DATE_CREATED and EVENT_NAME (in that order as EVENT_DATE_CREATED
> is more dense t
Daniel Caune wrote:
>
> Andrew Sullivan wrote:
>
> > On Wed, Feb 15, 2006 at 04:58:54PM -0500, Daniel Caune wrote:
> >
> > >
> > > Is there a way to force PostgreSQL using an index for a SELECT
> > > statement?
> >
> > Your best bet is to do
> >
> > set enable_indexscan=false;
> >
> > and then
> On Wed, Feb 15, 2006 at 04:58:54PM -0500, Daniel Caune wrote:
> > Hi,
> >
> >
> >
> > Is there a way to force PostgreSQL using an index for a SELECT
> > statement? I just want to confirm that the index PostgreSQL decides
to
> > use is better than the index I supposed PostgreSQL would use (I
alr
SET SESSION enable_seqscan TO OFF could be interpreted as a strong hint to the
server that you want it to use indexes. It's not completely mandatory (the
server WILL still do a sequential scan if it has to) but postgresql will
strongly prefer index scans. You may also have some luck twiddling
On Wed, Feb 15, 2006 at 04:58:54PM -0500, Daniel Caune wrote:
> Hi,
>
>
>
> Is there a way to force PostgreSQL using an index for a SELECT
> statement? I just want to confirm that the index PostgreSQL decides to
> use is better than the index I supposed PostgreSQL would use (I already
> analyz
10 matches
Mail list logo