Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8D0669FB47E for ; Wed, 17 Oct 2007 10:41:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 16963-01 for ; Wed, 17 Oct 2007 10:40:41 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 5AD279FB5D4 for ; Wed, 17 Oct 2007 10:40:58 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so250606ugf for ; Wed, 17 Oct 2007 06:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=i9p+icZedHPhrbgS/1TwiPhkbIdr3aZ8tu6Fv2M0Gyc=; b=HR3I4Zb1d5X15iPxrKQNOR3xA+BIAk8fhQttx9QVJ+fqaQzPME32PH9M47+A6tStLpNIeiP7usFnQKLtX1lfluJmvJ9oTxyo0qB7OzI2ZHvqgp7lr31ogrcH6vNwj80lDzbfW9CmJ25E3Z0JO/WgEwlXmVcNs12bB2nvETOsDFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=cBdgm8VEWIpGP450igrWQjVJG63Rw4mZKHhLxMxJPQSO9NEeJCJnhbYL4tUDGaRBI+cI4Mv1Ne8Ta/HdTAioBR77uiB3VMzAzjE8pxiDYNEPRwsJdEIzjbR5tBahs/XvJ/SSnau3LWwrEexwv3CV/Hmbe3DL8kL4MzzbIGDcr/M= Received: by 10.67.25.6 with SMTP id c6mr608285ugj.1192628456336; Wed, 17 Oct 2007 06:40:56 -0700 (PDT) Received: from ?172.24.32.198? ( [62.232.55.118]) by mx.google.com with ESMTPS id y34sm6914413iky.2007.10.17.06.40.53 (version=SSLv3 cipher=RC4-MD5); Wed, 17 Oct 2007 06:40:54 -0700 (PDT) Message-ID: <471610A6.7070505@enterprisedb.com> Date: Wed, 17 Oct 2007 14:39:50 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.12 (X11/20070730) MIME-Version: 1.0 To: Stefano Dal Pra , pgsql-sql@postgresql.org, pgsql-performance@postgresql.org Subject: Re: two queryes in a single tablescan References: <290a5abc0710170530v215cb2b0q4fa000ad43096a28@mail.gmail.com> <20071017131524.GC3237@uio.no> In-Reply-To: <20071017131524.GC3237@uio.no> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/201 X-Sequence-Number: 27223 Steinar H. Gunderson wrote: > On Wed, Oct 17, 2007 at 02:30:52PM +0200, Stefano Dal Pra wrote: >> The main goal would be to get multiple results while scanning the >> table[s] once only >> thus getting results in a faster way. > > In 8.3, Postgres will do this for you itself -- if you already have a > sequential scan running against a given table, another one starting in > parallel will simply piggyback it. You'd have to run the seq scans at the same time, from two different backends, so it's not going to help here. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com