Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f22ITpx64281 for ; Fri, 2 Mar 2001 13:29:51 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f22I3gv02403 for pgsql-admin@postgresql.org; Fri, 2 Mar 2001 13:03:42 -0500 (EST) (envelope-from news) From: Salvador =?iso-8859-1?Q?Main=E9?= X-Newsgroups: comp.databases.postgresql.admin Subject: multicolumn index vs two indexes Date: Fri, 02 Mar 2001 18:02:16 -0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 17 Message-ID: <3A9FEE38.725BCE15@yahoo.com> Reply-To: salva@ronincoders.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.75 [es] (X11; U; Linux 2.2.16-22 i586) X-Accept-Language: en To: pgsql-admin@postgresql.org X-Archive-Number: 200103/30 X-Sequence-Number: 874 Hello: I have a table whith an id field, a date field and 5 millions rows. I need make queries like select *on table where id='001' and fecha >='1-1-1999' and fecha <'1-1-2000'; What is better? To create a multicolumn btree index with (date, id) or two indexes, one btree for the date and a hash for the id? Where can I find mor accurate info about indexes? (the manual is a little bit short of it). Thanks -- Salva