Skip site navigation (1) Skip section navigation (2)

Re: [SQL] two queryes in a single tablescan

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-performance(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] two queryes in a single tablescan
Date: 2007-10-20 17:19:39
Message-ID: 20071020171938.GA24518@KanotixBox (view raw or flat)
Thread:
Lists: pgsql-performancepgsql-sql
Markus Schaber <schabi(at)logix-tt(dot)com> schrieb:
> > is there any way to get both results in a single query,
> > eventually through stored procedure?
> > The retrieved [count(*),A] ; [count(*),B)] data couldnt fit
> > on a single table, of course.
> > 
> > The main goal would be to get multiple results while scanning the
> > table[s] once only
> > thus getting results in a faster  way.
> 
> PostgreSQL 8.3 contains great improvements in this area, you can simply
> start the selects from concurrent connections, and the backend will
> synchronize the scans.

works this right across different transactions? I mean, for instance, TX
a insert rows and TX b insert other rows and both clients (with
different transactions) starts a seq-scan?


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

In response to

Responses

pgsql-performance by date

Next:From: Pavel VelikhovDate: 2007-10-20 20:11:00
Subject: Re: need help with a query
Previous:From: Markus SchaberDate: 2007-10-20 10:58:24
Subject: Re: [SQL] two queryes in a single tablescan

pgsql-sql by date

Next:From: Erik JonesDate: 2007-10-20 22:02:23
Subject: Re: [SQL] two queryes in a single tablescan
Previous:From: Markus SchaberDate: 2007-10-20 10:58:24
Subject: Re: [SQL] two queryes in a single tablescan

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group