PDA

View Full Version : PostgreSQL query out of memory



anter
05-30-2010, 04:12 PM
When I try to run the query below in pgAdmin III I get an out of memory message.



SELECT standardizedhandhistory
FROM handhistories
JOIN pokerhands
ON pokerhands.pokerhand_id = handhistories.pokerhand_id
JOIN pokersites
ON pokersites.site_id = pokerhands.site_id
WHERE sitename = 'Prima'


I've understood from a little reading that I can use something called a "cursor" to fix the out of memory problem.

Do you know how/if a cursor can be used to make the above query work?

lethalrose
05-30-2010, 05:15 PM
This error message has nothing to do with HEM, its a generic error message that occurs on all database management systems.

you could try modifying the query so it does not return a large result set.
your query is probably going over the amount of memory PostGRE has to play with.

lethalrose
05-30-2010, 05:44 PM
Tested the query on my machine and it works fine, i only get 10k results though, i just started using HEM..


to answer your question, yes you could use cursors as a workaround. but there should be a setting you can modify on your postGRE server to make the query work.