Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1938663286B for ; Fri, 5 Feb 2010 14:30:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 29699-06 for ; Fri, 5 Feb 2010 18:29:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by mail.postgresql.org (Postfix) with ESMTP id 3078F632BC8 for ; Fri, 5 Feb 2010 14:29:59 -0400 (AST) Received: by fxm6 with SMTP id 6so2762911fxm.18 for ; Fri, 05 Feb 2010 10:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=VH9aH3Z0I6OmoDphtYJDi8099rkd5strdJnGLMxB2y0=; b=n1VIZHfte9mX4uK53rTNVjQz0+kJNOFso4KoXcfZ7keAiPteBq1OTSlc9w8UWQzIB6 csWcmamRGVyfr7OcWmql/iPAkGASKhUk62h5lLGxzxckSvQjuaD0wYcQ4sdK2CpfKo0v jQsii6pI6lRGdGdL34UOaJyX5JupkAjJcN5qs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=D2TzuvceOiN4SmkG8vqh9kgvEu3iDGI/zOxupPwy4C9HVMsElwGF1ZVKOJgyEk6+zI LTpppBIUm40Aijai9EHcv9R3gBWB89/SwQ2QwNHlo7PhJEBnuFp/5gryZoYINCEwwsw+ dKhKUduOEm6yq4IizijePd2rdpDi305MLtyuQ= MIME-Version: 1.0 Received: by 10.239.193.4 with SMTP id g4mr193134hbi.192.1265394197504; Fri, 05 Feb 2010 10:23:17 -0800 (PST) In-Reply-To: <15213497474b6c0fe595df07.79488231.Active.mail@starapoczta.nazwa.pl> References: <15213497474b6c0fe595df07.79488231.Active.mail@starapoczta.nazwa.pl> Date: Fri, 5 Feb 2010 13:23:17 -0500 Message-ID: <603c8f071002051023s3101e1f6r5d330b98b491d4bf@mail.gmail.com> Subject: Re: index on partitioned table From: Robert Haas To: Wojtek Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.652 tagged_above=-10 required=5 tests=AWL=-0.698, BAYES_05=-1.11, SUBJECT_FUZZY_TION=0.156 X-Spam-Level: X-Archive-Number: 201002/103 X-Sequence-Number: 37524 2010/2/5 Wojtek : > Most of my queries will have where conditions on timedate and sys_device_id, but a lot of them will have additional clause: where usefields is not null. Some of the queries will be limited on timedate only. What about a partial index on (timedate) WHERE usefields IS NOT NULL; or maybe on (timedate, sys_device_id) WHERE usefields IS NOT NULL? ...Robert