Way around the Memory Budget constraints!

I am processing an ad-hoc query and getting the following error:

pq: sql: memory budget exceeded: 282746880 bytes requested, 8434251776 bytes in budget

Is there any way to increase the memory budget for a query, or any way around ?

See https://www.cockroachlabs.com/blog/memory-usage-cockroachdb/ and the --max-sql-memory flag.

Is it surprising that your query is trying to use 300M of memory? And generally, that other queries currently running are using 8GB of memory? If yes, gives us more details about what you’re doing.

Do we foresee any improvement on memory constraints for large query in version 2.0?

We’ve introduced spilling to disk of temporary results in 1.1, which helps bound the memory use of some classes of queries. And we’ve expanded that for 2.0.
And there’s been other memory use improvements too. But whether or not we’ve improved depends on what type of query you’re running exactly.