pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antony Paul <antonypaul24@gmail.com>
To: Jan Poslusny <pajout@gingerall.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: Index not used with or condition
Date: Mon, 7 Feb 2005 17:28:14 +0530
Message-ID: <2989532e05020703584989cd15@mail.gmail.com> (raw)
In-Reply-To: <420756BA.4080507@gingerall.cz>
References: <2989532e05020701073638ca4c@mail.gmail.com>
	<2989532e0502070314402057cc@mail.gmail.com>
	<420756BA.4080507@gingerall.cz>

I ran analyze; several times.

rgds
Antony Paul


On Mon, 07 Feb 2005 12:53:30 +0100, Jan Poslusny <pajout@gingerall.cz> wrote:
> It depends on many circumstances, but, at first, simple question: Did
> you run vacuum analyze?
> I am satisfied with functional indexes - it works in my pg 7.4.x.
> 
> Antony Paul wrote:
> 
> >On more investigation I found that index scan is not used if the query
> >have a function in it like lower() and an index exist for lower()
> >column.
> >
> >rgds
> >Antony Paul
> >
> >
> >On Mon, 7 Feb 2005 14:37:15 +0530, Antony Paul <antonypaul24@gmail.com> wrote:
> >
> >
> >>Hi all,
> >>    I am facing a strange problem when I run EXPLAIN against a table
> >>having more than 100000 records. The query have lot of OR conditions
> >>and when parts of the query is removed it is using index. To analyse
> >>it I created a table with a single column, inserted 100000
> >>records(random number) in it created index and run a query which
> >>returns 1 record which have no or condition and it was using index.  I
> >>added an OR conditon and is using sequential scan. I set the
> >>enable_seqscan to off. I ran the tests again and is using index scan.
> >>   So which one I have to use. Is this any bug in Explain.
> >>
> >>rgds
> >>Antony Paul.
> >>
> >>
> >>
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 3: if posting/reading through Usenet, please send an appropriate
> >      subscribe-nomail command to majordomo@postgresql.org so that your
> >      message can get through to the mailing list cleanly
> >
> >
> >
>



view thread (6+ messages)

Message-ID: <2989532e05020703584989cd15@mail.gmail.com>
Permalink:  ../2989532e05020703584989cd15@mail.gmail.com/
Also on:    postgresql.org/message-id/2989532e05020703584989cd15@mail.gmail.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: antonypaul24@gmail.com, pajout@gingerall.cz
  Subject: Re: Index not used with or condition
  In-Reply-To: <2989532e05020703584989cd15@mail.gmail.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