From: Denis Gasparin <denis(at)edinet(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject:
Date: 2001-08-23 16:05:35
Message-ID: 5.1.0.14.0.20010823180034.00a80cf0@10.1.1.2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi to all!
I have created a table using the CREATE TABLE new_table (col1,col2,col3)
AS SELECT col1,col2,col3 FROM org_table.
I create an index on this table using the statement:
CREATE UNIQUE INDEX table_idx ON new_table (col1).
Then i do a select as this:
SELECT * FROM new_table WHERE col1 = 'value'.

The problem is that when i do an explain this is the query plan:

Seq Scan on new_table (cost=0.00..1116.38 rows=500 width=44)

Can anyone explain me why it doesn't use the index I have created?

Thank you for you help...

Bye, Denis

In response to

Responses

  • Re: at 2001-08-23 17:03:29 from Doug McNaught

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2001-08-23 16:05:58 Re: SELECT FOR UPDATE
Previous Message Gilles DAROLD 2001-08-23 15:58:43 Problem with libpsqlodbc