index not scanned - Mailing list pgsql-general

From Ben-Nes Michael
Subject index not scanned
Date
Msg-id 001101c27da6$211da7f0$aa0f5ac2@canaan.co.il
Whole thread Raw
Responses Re: index not scanned  (Martijn van Oosterhout <kleptog@svana.org>)
List 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


pgsql-general by date:

Previous
From: Leif Jensen
Date:
Subject: Re: PHP and PostgreSQL
Next
From: Martijn van Oosterhout
Date:
Subject: Re: index not scanned