Re: [HACKERS] using indexes

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] using indexes
Date: 1998-10-19 14:46:59
Message-ID: 362B50E3.C529DDDE@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sferacarta Software wrote:
>
> Hello all,
>
> I have a table SP with a primary key SNO,
> I'm trying if v6.4beta2 uses indexes
> but seems it uses indexes only with '=' operator:

regression=> explain select unique1 from onek where unique1 < 3;
NOTICE: QUERY PLAN:

Index Scan using onek_unique1 on onek (cost=28.67 size=334 width=4)

> prova=> explain select * from sp where sno = 'S1';
> NOTICE: QUERY PLAN:
> Index Scan using sp_pkey on sp (cost=0.00 size=0 width=28)
> EXPLAIN

Looks like maybe you need to vacuum to get statistics for the optimizer?

- Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-10-19 14:52:51 Re: cpp preprocessor problem in postgres
Previous Message Tom Lane 1998-10-19 14:05:42 Recent Makefile changes (was Re: unique indexes and pqlib)