The topic below is quite common on the general list, people tend to ask without checking the documentation. I think most of those questions will disappear if the planner output is modified, so it is clear why a decision is made (maybe with an extra option).
e.g. something like this if an index scan is possible but not used: EXPLAIN SELECT * FROM copy_of_forum_list_child WHERE f_id = 1 and father_name = 'top'; Seq Scan on copy_of_forum_list_child (cost=0.00..2.44 rows=1width=100, costs using index: 0.00...9.44 rows=... with=...) Any comments? Regards, Mario Weilguni ---------- Weitergeleitete Nachricht ---------- Subject: [GENERAL] index not scanned Date: Sun, 27 Oct 2002 12:46:39 +0200 From: "Ben-Nes Michael" <[EMAIL PROTECTED]> To: "postgresql" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) ------------------------------------------------------- ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly