explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kHQE

Settings
# exclusive inclusive rows x rows loops node
1. 0.248 2.268 ↓ 17.1 512 1

Nested Loop Left Join (cost=179.50..513.71 rows=30 width=3,548) (actual time=0.950..2.268 rows=512 loops=1)

2. 0.250 2.020 ↓ 17.1 512 1

Nested Loop Left Join (cost=179.36..507.54 rows=30 width=2,293) (actual time=0.948..2.020 rows=512 loops=1)

3. 0.248 1.770 ↓ 17.1 512 1

Nested Loop Left Join (cost=179.07..452.12 rows=30 width=1,961) (actual time=0.947..1.770 rows=512 loops=1)

  • Filter: ((t3.id = 'd0b82b70-5740-8ef9-6666-d647e8ad44a4'::uuid) OR (t1.department_id IS NULL))
  • Rows Removed by Filter: 8
4. 0.115 1.522 ↓ 10.6 520 1

Hash Left Join (cost=178.79..384.68 rows=49 width=1,888) (actual time=0.942..1.522 rows=520 loops=1)

  • Hash Cond: (t1.department_id = t2.correspondent_id)
5. 0.310 1.245 ↓ 10.6 520 1

Hash Join (cost=167.67..372.94 rows=49 width=1,872) (actual time=0.776..1.245 rows=520 loops=1)

  • Hash Cond: (t0.office_file_nomenclature_id = t1.id)
6. 0.185 0.284 ↓ 1.3 521 1

Bitmap Heap Scan on df_office_file t0 (cost=17.57..220.80 rows=415 width=1,402) (actual time=0.115..0.284 rows=521 loops=1)

  • Recheck Cond: ((delete_ts IS NULL) AND (state = '10'::bigint) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid))
  • Heap Blocks: exact=34
7. 0.099 0.099 ↓ 1.3 521 1

Bitmap Index Scan on test3 (cost=0.00..17.47 rows=415 width=0) (actual time=0.099..0.099 rows=521 loops=1)

  • Index Cond: ((delete_ts IS NULL) AND (state = '10'::bigint) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid))
8. 0.166 0.651 ↓ 1.0 520 1

Hash (cost=143.63..143.63 rows=517 width=486) (actual time=0.651..0.651 rows=520 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 172kB
9. 0.237 0.485 ↓ 1.0 520 1

Hash Left Join (cost=14.80..143.63 rows=517 width=486) (actual time=0.133..0.485 rows=520 loops=1)

  • Hash Cond: (t1.organization_id = t4.id)
10. 0.124 0.217 ↓ 1.0 520 1

Bitmap Heap Scan on df_office_file_nomenclature t1 (cost=9.75..136.64 rows=517 width=348) (actual time=0.097..0.217 rows=520 loops=1)

  • Recheck Cond: (((delete_ts IS NULL) AND ((doc_kind)::text = 'O'::text) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid)) OR ((delete_ts IS NULL) AND (doc_kind IS NULL) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid)))
  • Heap Blocks: exact=32
11. 0.001 0.093 ↓ 0.0 0 1

BitmapOr (cost=9.75..9.75 rows=62 width=0) (actual time=0.093..0.093 rows=0 loops=1)

12. 0.008 0.008 ↓ 0.0 0 1

Bitmap Index Scan on test2 (cost=0.00..4.30 rows=1 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((delete_ts IS NULL) AND ((doc_kind)::text = 'O'::text) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid))
13. 0.084 0.084 ↓ 8.5 520 1

Bitmap Index Scan on test2 (cost=0.00..5.20 rows=61 width=0) (actual time=0.084..0.084 rows=520 loops=1)

  • Index Cond: ((delete_ts IS NULL) AND (doc_kind IS NULL) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid) AND (organization_id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid))
14. 0.003 0.031 ↑ 1.0 1 1

Hash (cost=5.04..5.04 rows=1 width=154) (actual time=0.031..0.031 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.028 0.028 ↑ 1.0 1 1

Seq Scan on df_organization t4 (cost=0.00..5.04 rows=1 width=154) (actual time=0.016..0.028 rows=1 loops=1)

  • Filter: (id = 'f4e3cace-5776-8cb2-89f2-691b4a452189'::uuid)
  • Rows Removed by Filter: 82
16. 0.041 0.162 ↑ 1.0 361 1

Hash (cost=6.61..6.61 rows=361 width=16) (actual time=0.162..0.162 rows=361 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
17. 0.121 0.121 ↑ 1.0 361 1

Seq Scan on df_department t2 (cost=0.00..6.61 rows=361 width=16) (actual time=0.010..0.121 rows=361 loops=1)

18. 0.000 0.000 ↓ 0.0 0 520

Index Scan using df_correspondent_pkey on df_correspondent t3 (cost=0.28..1.36 rows=1 width=105) (actual time=0.000..0.000 rows=0 loops=520)

  • Index Cond: (t2.correspondent_id = id)
19. 0.000 0.000 ↓ 0.0 0 512

Index Scan using df_office_file_nomenclature_pkey on df_office_file_nomenclature t5 (cost=0.28..1.85 rows=1 width=348) (actual time=0.000..0.000 rows=0 loops=512)

  • Index Cond: (t1.parent_nomenclature_id = id)
20. 0.000 0.000 ↓ 0.0 0 512

Index Scan using df_numerator_pkey on df_numerator t6 (cost=0.14..0.21 rows=1 width=1,271) (actual time=0.000..0.000 rows=0 loops=512)

  • Index Cond: (t0.numerator_id = id)