From: | imad <immaad(at)gmail(dot)com> |
---|---|
To: | "Paul Tomblin" <ptomblin(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Query size? |
Date: | 2008-06-22 12:23:36 |
Message-ID: | 1f30b80c0806220523n6a7472a5x876d1afc6ee7f7a7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Why dont you adopt a pro-active aproach here and append a LIMIT to
every query you send to the server?
You can do an OFFSET LIMIT combination of all queries until you get
results less than LIMIT.
--Imad
On Sun, Jun 22, 2008 at 9:38 PM, Paul Tomblin <ptomblin(at)gmail(dot)com> wrote:
> I'm working with another developer to produce an iPhone app - he's writing
> the app and I'm writing the server that provides the data to it. One of the
> queries he's doing might produce hundreds or thousands of results, and he
> doesn't want me sending that much data.
>
> So I'm wondering if there is a simple way to determine if a query is going
> to produce a result of more than N rows? Is the only way to do a "select
> count(*)" query first, or there something in the ResultSet that tells me how
> many results are queued up?
>
> --
> Paul Tomblin <ptomblin(at)xcski(dot)com> http://blog.xcski.com/
> God is real, unless declared as an integer.
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Tomblin | 2008-06-22 12:37:29 | Re: Query size? |
Previous Message | Paul Tomblin | 2008-06-22 11:38:49 | Query size? |