You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./tpch -dist-sql=false -queries 8 -v
Starting TPC-H load generator
Setting up the database. Connecting to db: postgresql://root@localhost:26257/tpch?sslmode=disable
Error occured when running query 8: pq: sql: memory budget exceeded: 10240 bytes requested, 4294967296 bytes in budget
Finished query 8: 0 rows returned after 26.36 seconds
This is using single-node sql running 61ed30f. Here is the query:
SELECT
o_year,
SUM(CASE
WHEN nation = 'CANADA' THEN volume
ELSE 0
END) / SUM(volume) AS mkt_share
FROM
(
SELECT
EXTRACT(year FROM o_orderdate) AS o_year,
l_extendedprice * (1 - l_discount) AS volume,
n2.n_name AS nation
FROM
part,
supplier,
lineitem,
orders,
customer,
nation n1,
nation n2,
region
WHERE
p_partkey = l_partkey
AND s_suppkey = l_suppkey
AND l_orderkey = o_orderkey
AND o_custkey = c_custkey
AND c_nationkey = n1.n_nationkey
AND n1.n_regionkey = r_regionkey
AND r_name = 'AMERICA'
AND s_nationkey = n2.n_nationkey
AND o_orderdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31'
AND p_type = 'ECONOMY POLISHED STEEL'
) AS all_nations
GROUP BY
o_year
ORDER BY
o_year;
Looking at a memory profile while the query is running shows nothing surprising apart from the amount of memory the budget says we have exceeded in contrast with what is shown in the profile, note however that I do download the profile while the query is running (but did so a second or so before the error is reported) so this might be showing an early enough sample.
The interesting thing here is that @arjunravinarayan says that TPC-H query 8 used to run fine so we have to figure out what changed.
The text was updated successfully, but these errors were encountered:
Looking at memory usage through the admin ui confirms that memory is accounted for correctly. I check out a commit from March 1st (2817772) which I believe was around when these TPC-H queries were run with single-node SQL and ran into the same issue.
This query runs but uses up ~13.8GiB without memory accounting. I don't think there's anything else left to do here as this pertains to limiting large memory usage by queries (see #15206). Closing this issue.
This is using single-node sql running 61ed30f. Here is the query:
Looking at a memory profile while the query is running shows nothing surprising apart from the amount of memory the budget says we have exceeded in contrast with what is shown in the profile, note however that I do download the profile while the query is running (but did so a second or so before the error is reported) so this might be showing an early enough sample.

The interesting thing here is that @arjunravinarayan says that TPC-H query 8 used to run fine so we have to figure out what changed.
The text was updated successfully, but these errors were encountered: