On Thu, Oct 28, 2010 at 1:49 PM, AI Rumman wrote:
> But I am using Postgresql 8.1 and it is not possible to write query as your
> one here.
with 8.1, you are limited to subquery approach, application derived
count, plpgsql hacks, etc.
merlin
--
Sent via pgsql-performance mailing list (pgsql-pe
But I am using Postgresql 8.1 and it is not possible to write query as your
one here.
On Thu, Oct 28, 2010 at 11:05 PM, Robert Haas wrote:
> On Tue, Oct 19, 2010 at 7:56 PM, Merlin Moncure
> wrote:
> > On Mon, Oct 18, 2010 at 1:16 AM, AI Rumman wrote:
> >> At present for reporting I use follow
On Thu, Oct 28, 2010 at 1:05 PM, Robert Haas wrote:
> On Tue, Oct 19, 2010 at 7:56 PM, Merlin Moncure wrote:
>> On Mon, Oct 18, 2010 at 1:16 AM, AI Rumman wrote:
>>> At present for reporting I use following types of query:
>>> select crm.*, crm_cnt.cnt
>>> from crm,
>>> (select count(*) as cnt f
On Tue, Oct 19, 2010 at 7:56 PM, Merlin Moncure wrote:
> On Mon, Oct 18, 2010 at 1:16 AM, AI Rumman wrote:
>> At present for reporting I use following types of query:
>> select crm.*, crm_cnt.cnt
>> from crm,
>> (select count(*) as cnt from crm) crm_cnt;
>> Here count query is used to find the to
On Mon, Oct 18, 2010 at 1:16 AM, AI Rumman wrote:
> At present for reporting I use following types of query:
> select crm.*, crm_cnt.cnt
> from crm,
> (select count(*) as cnt from crm) crm_cnt;
> Here count query is used to find the total number of records.
> Same FROM clause is copied in both the
On Tue, Oct 19, 2010 at 1:18 AM, AI Rumman wrote:
> Not actualy. I used pagination with limit clause in details query and I
> need the total number of records in the detail query.
>
>
Can you use a cursor? Roughly...
BEGIN;
DECLARE x CURSOR FOR SELECT * FROM crm;
MOVE FORWARD ALL IN x;
MOVE BAC
Not actualy. I used pagination with limit clause in details query and I need
the total number of records in the detail query.
On Mon, Oct 18, 2010 at 9:52 PM, Josh Kupershmidt wrote:
> On Mon, Oct 18, 2010 at 1:16 AM, AI Rumman wrote:
> > At present for reporting I use following types of query:
On Mon, Oct 18, 2010 at 1:16 AM, AI Rumman wrote:
> At present for reporting I use following types of query:
> select crm.*, crm_cnt.cnt
> from crm,
> (select count(*) as cnt from crm) crm_cnt;
> Here count query is used to find the total number of records.
> Same FROM clause is copied in both the
At present for reporting I use following types of query:
select crm.*, crm_cnt.cnt
from crm,
(select count(*) as cnt from crm) crm_cnt;
Here count query is used to find the total number of records.
Same FROM clause is copied in both the part of the query.
Is there any other good alternative way to