On Sun, Jun 12, 2005 at 10:12:27 -0400,
  Madison Kelly <[EMAIL PROTECTED]> wrote:
> Indexes:
>     "file_info_7_display_idx" btree (file_type, file_parent_dir, file_name)

>   Here is my full query:
> 
> tle-bu=> EXPLAIN ANALYZE SELECT file_name, file_parent_dir, file_type 
> FROM file_info_7 WHERE file_type='d' ORDER BY file_parent_dir ASC, 
> file_name ASC;
>                                                          QUERY PLAN
> -----------------------------------------------------------------------------------------------------------------------------

This is a case where postgres's planner can't make a deduction needed for
it to realize that the index can be used. Try rewriting the query as:

SELECT file_name, file_parent_dir, file_type 
  FROM file_info_7 WHERE file_type='d'
  ORDER BY file_type ASC, file_parent_dir ASC, file_name ASC;

---------------------------(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

Reply via email to