Re: Yet again on indices...

From: Hannu Krosing <hannu(at)krosing(dot)net>
To: Jean-Paul ARGUDO <jean-paul(dot)argudo(at)idealx(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, sdinot(at)idealx(dot)com, dbarth(at)idealx(dot)com
Subject: Re: Yet again on indices...
Date: 2002-02-27 07:25:15
Message-ID: 1014794715.2127.118.camel@rh72.home.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2002-02-27 at 14:48, Jean-Paul ARGUDO wrote:
> Ok,
>
> I'm working on query analysis for a program in ecpg for business puposes. Look
> at what I found on with PG 7.2: Please be cool with my french2english processor,
> I got few bogomips in my brain dedicated to english (should have listen more in
> class..):
> ----
>
> line 962 (in the ecpg source..)
>
> EXPLAIN SELECT t12_bskid, t12_pnb, t12_lne, t12_tck
> FROM T12_20011231
> WHERE t12_bskid >= 1
> ORDER BY t12_bskid, t12_pnb, t12_tck, t12_lne;
>
...

>
>
> => Uh? Seq scan cheaper than index???
>
> => let's disable seqscan to read cost of index:
> postgresql.conf : enable_seqscan = false

You could just do

set enable_seqscan to 'off'

in sql

> Sort (cost=3126.79..3126.79 rows=25693 width=46)
> -> Index Scan using t12_idx_bskid_20011231 on t12_20011231
> (cost=0.00..1244.86 rows=25693 width=46)
>
> => Uh? seq scan'cost is lower than index scan?? => mailto hackers

It often is. Really.

> ----
>
> What's your opinion?

What are the real performance numbers ?

If they are other than what postgresql optimiser thinks you can change
them in system table.

----------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-27 07:58:25 Re: PostgreSQL 8.0 ??
Previous Message Christopher Kings-Lynne 2002-02-27 06:50:29 Re: eWeek Poll: Which database is most critical to your