From: Mitch Vincent <mitch@venux.net>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: sql query not using indexes
Date: Wed, 20 Sep 2000 11:37:07 -0700
Message-ID: <008401c02331$c83e7540$0200000a@doot> (raw)
References: <Pine.BSF.4.10.10009201122040.57382-100000@megazone23.bigpanda.com>
I'm curious, I know PG doesn't have support for 'full' text indexing so I'm
wondering at what point does indexing become ineffective with text type
fields?
-Mitch
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone23.bigpanda.com>
To: "User Lenzi" <lenzi@k1.com.br>
Cc: "pgsql-sql" <pgsql-sql@postgresql.org>
Sent: Wednesday, September 20, 2000 11:23 AM
Subject: Re: [SQL] sql query not using indexes
> On Wed, 20 Sep 2000, User Lenzi wrote:
>
> > if I start a query:
> >
> > explain select * from teste where login = 'xxx'
> > results:
> > Index Scan using teste1 on teste (cost=0.00..97.88 rows=25 )
> >
> >
> > however a query:
> > explain select * from teste where login > 'AAA'
> > results:
> > Seq Scan on teste ....
> >
> >
> > On a machine running version 6.5 both queries results index scan.
> >
> > this results that the version 6.5 is faster than version 7.0.2 on this
> > kind of
> > query.
> >
> >
> > Any explanation???
>
> Have you done a vacuum analyze on the table? Also, what does the row
> count for the second query look like? It's probably deciding that
> there are too many rows that will match login >'AAA' for index scan
> to be cost effective. So, actually, also, what does
> select count(*) from teste where login>'AAA" give you on the 7.0.2 box.
>
>
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mitch@venux.net
Subject: Re: sql query not using indexes
In-Reply-To: <008401c02331$c83e7540$0200000a@doot>
References: <Pine.BSF.4.10.10009201122040.57382-100000@megazone23.bigpanda.com> <008401c02331$c83e7540$0200000a@doot>
* 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