Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8FC646346DD for ; Fri, 10 Apr 2009 02:20:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 59642-10 for ; Fri, 10 Apr 2009 02:20:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 01E826346D7 for ; Fri, 10 Apr 2009 02:20:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n3A5Kj6u014162; Fri, 10 Apr 2009 01:20:45 -0400 (EDT) To: "Rainer Mager" cc: pgsql-performance@postgresql.org Subject: Re: difficulties with time based queries In-reply-to: <000001c9b99a$743da930$5cb8fb90$@com> References: <003001c9b645$e8a7cec0$b9f76c40$@com> <003501c9b656$a9c73fe0$fd55bfa0$@com> <7371.1238981597@sss.pgh.pa.us> <000001c9b99a$743da930$5cb8fb90$@com> Comments: In-reply-to "Rainer Mager" message dated "Fri, 10 Apr 2009 14:08:56 +0900" Date: Fri, 10 Apr 2009 01:20:45 -0400 Message-ID: <14161.1239340845@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/185 X-Sequence-Number: 33552 "Rainer Mager" writes: > So, I need indices that make it fast querying against start_time as well as > all possible combinations of channel, player, and ad. There's some general principles in the manual --- have you read http://www.postgresql.org/docs/8.3/static/indexes.html especially 11.3 and 11.5? regards, tom lane