explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IMwM

Settings
# exclusive inclusive rows x rows loops node
1. 187.539 3,928.354 ↓ 2,100.4 420,087 1

Unique (cost=100,883.63..102,093.56 rows=200 width=90) (actual time=2,854.203..3,928.354 rows=420,087 loops=1)

2. 3,158.373 3,740.815 ↓ 1.7 420,087 1

Sort (cost=100,883.63..101,488.59 rows=241,986 width=90) (actual time=2,854.202..3,740.815 rows=420,087 loops=1)

  • Sort Key: cte.*
  • Sort Method: external merge Disk: 39,776kB
3. 207.006 582.442 ↓ 1.7 420,087 1

Hash Join (cost=744.45..66,837.06 rows=241,986 width=90) (actual time=0.287..582.442 rows=420,087 loops=1)

4. 375.178 375.178 ↑ 1.0 1,920,278 1

Seq Scan on code_tree cte (cost=0..58,359.78 rows=1,920,278 width=106) (actual time=0.015..375.178 rows=1,920,278 loops=1)

5. 0.003 0.258 ↑ 41.3 3 1

Hash (cost=742.9..742.9 rows=124 width=16) (actual time=0.257..0.258 rows=3 loops=1)

6. 0.019 0.255 ↑ 41.3 3 1

Unique (cost=741..741.66 rows=124 width=16) (actual time=0.236..0.255 rows=3 loops=1)

7. 0.035 0.236 ↑ 2.0 66 1

Sort (cost=741..741.33 rows=133 width=16) (actual time=0.235..0.236 rows=66 loops=1)

  • Sort Key: ct.root_code_id
  • Sort Method: quicksort Memory: 28kB
8. 0.054 0.201 ↑ 2.0 66 1

Bitmap Heap Scan on code_tree ct (cost=218.08..736.31 rows=133 width=16) (actual time=0.157..0.201 rows=66 loops=1)

  • Heap Blocks: exact=22
9. 0.147 0.147 ↑ 2.0 66 1

Bitmap Index Scan on idx_descendant_id (cost=0..218.05 rows=133 width=0) (actual time=0.147..0.147 rows=66 loops=1)

  • Index Cond: (descendant_id = ANY ('{ecdedf8a-d2af-4742-828b-5b4d7395c44f,7bbeef50-ee3c-438a-931a-90fe9e833f97,9ec2ca52-c868-4d4b-ae14-905b539bc0c1,7bbeef50-ee3c-438a-931a-90fe9e833f97,9ec2ca52-c868-4d4b-ae14-905b539bc0c1,7bbeef50-ee3c-438a-931a-90fe9e833f97,7bbeef50-ee3c-438a-931a-90fe9e833f97,9ec2ca52-c868-4d4b-ae14-905b539bc0c1,dcdde8df-2aef-4e8f-97bc-341a4832e5aa,4ea41587-8578-4e4d-b879-43baad4bb199,7bbeef50-ee3c-438a-931a-90fe9e833f97,40a2e974-e632-497e-b3c5-615b03c46518,40a2e974-e632-497e-b3c5-615b03c46518,40a2e974-e632-497e-b3c5-615b03c46518,c8fce122-695b-4dd5-a6d7-33ba204bb210,40a2e974-e632-497e-b3c5-615b03c46518,d569b9a2-e88b-490b-bfac-3fffaaa13a39,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,fa6f5464-ba70-4131-91ce-f4bb57edebd2,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,6fbd7658-7394-4c21-b301-9eb0029ef7bb,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,57fcd67c-aa03-4190-aecc-a58f6730e3b2,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,ee853e6e-ae98-4b21-ac47-03fa956e2e7c,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,b96b527a-de9b-4a72-b8ee-da212aae9f5c,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,2c4c7959-1382-44e5-9f38-ec21e3bc6357,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,05defc94-b478-4fa3-9d68-a73900316cd2,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,96834fa6-0b77-4055-a78f-ce95b4ef0586,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,cfab8b65-84ee-4335-9fac-7f66e9745b68,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,a8ab1406-d258-41f4-89aa-020c5608aa79,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,e0a639fe-1020-4c55-8e9c-61f335764686,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,74c9caca-1292-4e03-8023-132bdc66d9ba,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,d6f7e4db-4ff8-46b1-ae09-7f4d8b096dff,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,2d7a1971-18ca-4e54-a2ff-2b54a388655d,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,ee3233c2-0441-4a8b-b261-cde95b2acc65,e9a7edc4-7b2b-4f43-9466-c2bceeb6efff,75f511e6-0176-40cf-b18f-644c9bc09846}'::uuid[]))
Planning time : 0.822 ms
Execution time : 3,952.387 ms