pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedDealing with large query results
3+ messages / 3 participants
[nested] [flat]
* Dealing with large query results
@ 1999-02-08 20:06 Matthew Hagerty <matthew@venux.net>
0 siblings, 2 replies; 3+ messages in thread
From: Matthew Hagerty @ 1999-02-08 20:06 UTC (permalink / raw)
To: pgsql-interfaces
Greetings,
I keep seeing reference to an 8K limit on query results. So how to deal
with query results greater than 8K? Am I under the wrong impression that
when you run a query from, say libpq, that each retch row is returned only
when you execute a fetchrow? Or is the whole query stuffed in to a buffer
which has an 8K limit?
I have to deal with some queries that create a huge result, and/or doing
reports requires a large result set. How can I deal with these larger results?
I'll probably get flamed for asking this one but, how can I step through a
table? Hey, sometimes you just have to do it.
Thanks,
Matthew
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] Dealing with large query results
@ 1999-02-08 20:43 Peter T Mount <peter@retep.org.uk>
parent: Matthew Hagerty <matthew@venux.net>
1 sibling, 0 replies; 3+ messages in thread
From: Peter T Mount @ 1999-02-08 20:43 UTC (permalink / raw)
To: Matthew Hagerty <matthew@venux.net>; +Cc: pgsql-interfaces
On Mon, 8 Feb 1999, Matthew Hagerty wrote:
> Greetings,
>
> I keep seeing reference to an 8K limit on query results. So how to deal
> with query results greater than 8K? Am I under the wrong impression that
> when you run a query from, say libpq, that each retch row is returned only
> when you execute a fetchrow? Or is the whole query stuffed in to a buffer
> which has an 8K limit?
No. The entire result is returned.
The 8k limit is the block size used to store data on disk. The limit
affects the size of each row, not the query results.
--
Peter T Mount peter@retep.org.uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] Dealing with large query results
@ 1999-02-08 21:25 Hannu Krosing <hannu@trust.ee>
parent: Matthew Hagerty <matthew@venux.net>
1 sibling, 0 replies; 3+ messages in thread
From: Hannu Krosing @ 1999-02-08 21:25 UTC (permalink / raw)
To: Matthew Hagerty <matthew@venux.net>; +Cc: pgsql-interfaces
Matthew Hagerty wrote:
>
> Greetings,
>
> I keep seeing reference to an 8K limit on query results. So how to deal
> with query results greater than 8K? Am I under the wrong impression that
> when you run a query from, say libpq, that each retch row is returned only
> when you execute a fetchrow? Or is the whole query stuffed in to a buffer
> which has an 8K limit?
the current 8K limit is for queries (and unrelatedly single rows),
not query _results_
> I have to deal with some queries that create a huge result, and/or doing
> reports requires a large result set. How can I deal with these larger results?
If you dont want to digest a huge result, you can do a
DECLARE CURSOR - FETCH -FETCH - FETCH - CLOSE CURSOR thing to get it in
pieces
(needs to be inside BEGIN TRANSACTION - END TRANSACTION)
> I'll probably get flamed for asking this one but, how can I step through a
> table? Hey, sometimes you just have to do it.
See above.
Actually postgres is quite happy to return gigabytes of data, if you
have
the resources (disk space, memory, time ;)
--------------
Hannu
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-02-08 21:25 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-02-08 20:06 Dealing with large query results Matthew Hagerty <matthew@venux.net>
1999-02-08 20:43 ` Peter T Mount <peter@retep.org.uk>
1999-02-08 21:25 ` Hannu Krosing <hannu@trust.ee>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox