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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-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

Browse pgsql-performance by date

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

Browse pgsql-sql by date

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