explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6DO3

Settings
# exclusive inclusive rows x rows loops node
1. 5.252 26,751.001 ↑ 8.9 8,499 1

Hash Join (cost=2,392,105.15..2,412,437.07 rows=75,957 width=97) (actual time=26,734.255..26,751.001 rows=8,499 loops=1)

  • Hash Cond: ((response_demographics.user_id)::text = (q1.user_id)::text)
2. 7.977 30.680 ↑ 1.1 8,499 1

GroupAggregate (cost=0.55..20,209.38 rows=9,707 width=57) (actual time=19.171..30.680 rows=8,499 loops=1)

  • Group Key: response_demographics.user_id
3. 22.703 22.703 ↑ 1.1 8,499 1

Index Scan using pk_response_demographics on response_demographics (cost=0.55..20,039.29 rows=9,751 width=50) (actual time=19.153..22.703 rows=8,499 loops=1)

  • Index Cond: ((survey_id)::text = '5849e400db4d0851ca000026'::text)
4. 6.315 26,715.069 ↓ 5.5 8,606 1

Hash (cost=2,392,085.03..2,392,085.03 rows=1,565 width=65) (actual time=26,715.069..26,715.069 rows=8,606 loops=1)

  • Buckets: 16384 (originally 2048) Batches: 1 (originally 1) Memory Usage: 3557kB
5. 3.753 26,708.754 ↓ 5.5 8,606 1

Subquery Scan on q1 (cost=2,392,022.15..2,392,085.03 rows=1,565 width=65) (actual time=25,782.754..26,708.754 rows=8,606 loops=1)

6. 557.788 26,705.001 ↓ 5.5 8,606 1

GroupAggregate (cost=2,392,022.15..2,392,069.38 rows=1,565 width=73) (actual time=25,782.753..26,705.001 rows=8,606 loops=1)

  • Group Key: rating_answers.user_id
  • Filter: (count(rating_answers.rating) = 79)
  • Rows Removed by Filter: 9486
7. 21,044.663 26,147.213 ↓ 882.7 1,398,161 1

Sort (cost=2,392,022.15..2,392,026.11 rows=1,584 width=29) (actual time=25,782.567..26,147.213 rows=1,398,161 loops=1)

  • Sort Key: rating_answers.user_id
  • Sort Method: external merge Disk: 57464kB
8. 197.662 5,102.550 ↓ 882.7 1,398,161 1

Gather (cost=133,153.47..2,391,937.96 rows=1,584 width=29) (actual time=4,527.216..5,102.550 rows=1,398,161 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 381.566 4,904.888 ↓ 706.1 466,054 3

Parallel Bitmap Heap Scan on rating_answers (cost=132,153.47..2,390,779.56 rows=660 width=29) (actual time=4,485.590..4,904.888 rows=466,054 loops=3)

  • Recheck Cond: ((survey_id)::text = '5849e400db4d0851ca000026'::text)
  • Filter: ((rating = ANY ('{1,2,3,4,5}'::integer[])) AND (question_id = ANY ('{04f76d6f-5849-f49b-db4d-081aab00009b,07386c0b-5849-f49c-db4d-081aab0000c8,17c850bd-5849-f49b-db4d-081aab000098,181307e1-5849-f49c-db4d-081aab0000d7,19e074e7-5849-f49c-db4d-081aab0000d4,1dbb2ee2-5849-f49b-db4d-081aab00008c,1e9366fd-5849-f49c-db4d-081aab0000cb,20fb4ad6-5849-f49d-db4d-081aab000120,2116b941-5849-f49a-db4d-081aab000065,234137f9-5849-f49c-db4d-081aab0000ce,23ac949a-5849-f49d-db4d-081aab000108,2aac189d-5849-f49b-db4d-081aab000092,2c5f96b8-5849-f49c-db4d-081aab0000a4,32567875-5849-f49a-db4d-081aab000062,36dfd3dd-5849-f49b-db4d-081aab000083,37174981-5849-f49d-db4d-081aab000126,379ce084-5849-f49d-db4d-081aab00010e,38559f79-5849-f49a-db4d-081aab00005a,3f1cbfb2-5849-f49a-db4d-081aab00007a,3fa7a1d1-5849-f49d-db4d-081aab000135,4646f06c-5849-f49c-db4d-081aab0000da,467af32d-5849-f49d-db4d-081aab000117,473f2d32-5849-f49d-db4d-081aab0000e3,49cc692e-5849-f49b-db4d-081aab000095,4b46b361-5849-f49c-db4d-081aab0000a1,4ee99015-5849-f49a-db4d-081aab000071,524a9199-5849-f49b-db4d-081aab000086,56c829c1-5849-f49a-db4d-081aab000068,5ae50125-5849-f49d-db4d-081aab0000fb,5b91174f-5849-f49b-db4d-081aab000080,66b1a9e3-5849-f49d-db4d-081aab0000dd,6821785e-5849-f49d-db4d-081aab0000ec,6baa1405-5849-f49d-db4d-081aab00012f,6f3b43ca-5849-f49c-db4d-081aab0000ad,703f469b-5849-f49d-db4d-081aab000129,715712fe-5849-f49d-db4d-081aab000144,738f1158-5849-f49d-db4d-081aab0000e9,7b21d5c5-5849-f49d-db4d-081aab00013b,7c03bf61-5849-f49d-db4d-081aab0000f8,7cbf00d7-5849-f49a-db4d-081aab000077,809e40cc-5849-f49d-db4d-081aab000111,8618733d-5849-f49e-db4d-081aab00014e,880f4e9a-5849-f49d-db4d-081aab00013e,89e38e14-5849-f49c-db4d-081aab0000d1,8aa8223f-5849-f49d-db4d-081aab0000f5,9660cdd3-5849-f49b-db4d-081aab00009e,997b79aa-5849-f49d-db4d-081aab00011a,9b33baaf-5849-f49a-db4d-081aab00006b,9e41bfac-5849-f49c-db4d-081aab0000a7,a0fd0fa8-5849-f49c-db4d-081aab0000c2,a1b438a9-5849-f49c-db4d-081aab0000c5,a1fcdf88-5849-f49d-db4d-081aab000123,a2ac69fb-5849-f49d-db4d-081aab0000ef,aedf8b7f-5849-f49d-db4d-081aab00012c,b1feda3c-5849-f49d-db4d-081aab00010b,b63b76ed-5849-f49c-db4d-081aab0000b6,bdb33548-5849-f49d-db4d-081aab000132,bdc887c8-5849-f49d-db4d-081aab000114,be6e30e9-5849-f49c-db4d-081aab0000b0,c386f079-5849-f49c-db4d-081aab0000bc,cac5051c-5849-f49c-db4d-081aab0000aa,cb6f4c6b-5849-f49a-db4d-081aab000074,cbe80e1d-5849-f49a-db4d-081aab00005f,cdc175ab-5849-f49b-db4d-081aab00007d,d7b3f24a-5849-f49b-db4d-081aab000089,dd37a0b8-5849-f49d-db4d-081aab0000fe,e4eb761d-5849-f49a-db4d-081aab00006e,e7618f75-5849-f49d-db4d-081aab000141,eb2d0dfe-5849-f49b-db4d-081aab00008f,ee2b76ff-5849-f49d-db4d-081aab0000f2,f152a595-5849-f49c-db4d-081aab0000b3,f2322719-5849-f49e-db4d-081aab00014b,f401d35e-5849-f49c-db4d-081aab0000bf,f6d2d9b7-5849-f49d-db4d-081aab0000e0,f8f4f05b-5849-f49d-db4d-081aab000101,f9513e01-5849-f49c-db4d-081aab0000b9,fadb679d-5849-f49d-db4d-081aab00011d,fca4a96f-5849-f49d-db4d-081aab000138,fffaca30-5849-f49d-db4d-081aab0000e6}'::uuid[])))
  • Rows Removed by Filter: 11976
  • Heap Blocks: exact=66
10. 4,523.322 4,523.322 ↓ 1.0 1,434,090 1

Bitmap Index Scan on pk_rating_answers (cost=0.00..132,153.07 rows=1,409,650 width=0) (actual time=4,523.321..4,523.322 rows=1,434,090 loops=1)

  • Index Cond: ((survey_id)::text = '5849e400db4d0851ca000026'::text)
Planning time : 0.499 ms
Execution time : 26,759.789 ms