HOW TO CREATE RESOURCE QUEUE IN GREENPLUM

Post date: Nov 28, 2013 4:30:39 PM

CREATE RESOURCE QUEUE demorq

ACTIVE THRESHOLD 2 --> Maximum Active statement . we can set it 4 if but to get better performance keep it 2

COST THRESHOLD 5000000 --> Represent max query cost . Cost is measured in units of disk page fetch. So for ACTIVE THRESHOLD 2 max cost/query 50 million

IGNORE THRESHOLD 100000 --> Smaller Queries that cost <100000 bypass the queue

NOOVERCOMMIT; --> Queries that exceed the cost limit will always be rejected

1. If you want more high cost queries to run at the same time then increase ACTIVE THRESHOLD. Do not increase it more than 4. We will get more errors if we increase it more than 4.

2. If you want to increase the cost threshold/query keeping the ACTIVE THRESHOLD 2 then just increase the COST THRESHOLD. It is 5 million (2.5 million/query) now.

3. If you want to run more small queries costing <100000 then you can just increase the IGNORE THRESHOLD value.