Re: postgresql not using index even though it's faster

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgresql not using index even though it's faster
Date: 2003-08-27 17:40:11
Message-ID: 1062006011.18108.600.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2003-08-26 at 22:32, Rudy Koento wrote:
> Hi, I've created an index but it's not being used by
> postgresql when doing a query. But doing an "explain
> analyze" shows that with index, it's faster. Here's
> the output:
[snip]
EXPLAIN ANALYZE SELECT S.* FROM sales S, staff ST
WHERE S.staff_no=ST.staff_no AND ST.name='Rudy';
[snip]

Are S.staff_no and ST.staff_no the same data type?

--
-----------------------------------------------------------------
Ron Johnson, Jr. ron(dot)l(dot)johnson(at)cox(dot)net
Jefferson, LA USA

"For me and windows it became a matter of easy to start with,
and becoming increasingly difficult to be productive as time
went on, and if something went wrong very difficult to fix,
compared to linux's large over head setting up and learning the
system with ease of use and the increase in productivity
becoming larger the longer I use the system."
Rohan Nicholls , The Netherlands

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2003-08-27 18:15:24 Re: Linux ready for high-volume databases?
Previous Message David Shadovitz 2003-08-27 17:08:27 CHAR vs TEXT args