Exalate commented:
Title
Fine-tune max-sql-memory best practice.
Description
Encountered getting Error: pq: windower-limited: memory budget exceeded: 112146104 bytes requested, 10240 currently allocated, 67108864 bytes in budget while running insert into fac_chrg select row_number() OVER () as fac_id,* from (select current_date(), random()::string, chrg_id from chrg_cd limit 7985445);
Outline
max-sql-memory describes how much RAM all SQL processors can take up on the whole cluster whereas sql.distsql.temp_storage.workmem is how much memory a single processor of a single query can use, so the former is “global” whereas the latter is “local”
There are couple other settings that describe how much memory joins and sorts can use before they are forced to spill to disk, but all other memory-intensive operations look at sql.distsql.temp_storage.workmem
cc https://cockroachlabs.slack.com/archives/C8HD41C82/p1575302414002600
potentially other issues to consolidate this:
Expected Audience
Developers and DBAs
Jira Issue: DOC-383
Exalate commented:
Title
Fine-tune
max-sql-memorybest practice.Description
Encountered
getting Error: pq: windower-limited: memory budget exceeded: 112146104 bytes requested, 10240 currently allocated, 67108864 bytes in budgetwhile runninginsert into fac_chrg select row_number() OVER () as fac_id,* from (select current_date(), random()::string, chrg_id from chrg_cd limit 7985445);Outline
max-sql-memorydescribes how much RAM all SQL processors can take up on the whole cluster whereassql.distsql.temp_storage.workmemis how much memory a single processor of a single query can use, so the former is “global” whereas the latter is “local”There are couple other settings that describe how much memory joins and sorts can use before they are forced to spill to disk, but all other memory-intensive operations look at
sql.distsql.temp_storage.workmemcc https://cockroachlabs.slack.com/archives/C8HD41C82/p1575302414002600
potentially other issues to consolidate this:
Expected Audience
Developers and DBAs
Jira Issue: DOC-383