index not scanned

From: "Ben-Nes Michael" <miki(at)canaan(dot)co(dot)il>
To: "postgresql" <pgsql-general(at)postgresql(dot)org>
Subject: index not scanned
Date: 2002-10-27 10:46:39
Message-ID: 001101c27da6$211da7f0$aa0f5ac2@canaan.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I add an Index to table that have only 30 rows.

CREATE INDEX copy_of_forum_l_c_f_id_idx ON copy_of_forum_list_child ( f_id,
father_name );

when i do:
EXPLAIN SELECT * FROM copy_of_forum_list_child WHERE f_id = 1 and
father_name = 'top';

its return: Seq Scan on copy_of_forum_list_child (cost=0.00..2.44 rows=1
width=100)

why its not scanning the index ?

does the planner knows that the table is small and it will take more time to
check the index then stright check ?

by the way, the table will get quite big in the future.

Cheers

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-10-27 10:56:57 Re: index not scanned
Previous Message Leif Jensen 2002-10-27 08:39:58 Re: PHP and PostgreSQL