28 Ekim 2021 Perşembe

SET

max_parallel_workers_per_gather 

Örnek - Disable parallel query execution for the current session
Şöyle yaparız
SET max_parallel_workers_per_gather = 0;
Örnek
Şöyle yaparız
-- to enable parallel query execution
SET max_parallel_workers_per_gather = 4;

-- to calculate total sales amount for each product category using parallelism
SELECT category, SUM(amount) AS total_sales
FROM sales
GROUP BY category;
Örnek
Şöyle yaparız
INSERT INTO sample_data SELECT generate_series(200000, 4000000);
SET max_parallel_workers_per_gather = 4;

SELECT COUNT(*) FROM sample_data;

Hiç yorum yok:

Yorum Gönder