explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2kV7

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 36,676.038 ↓ 0.0 0 1

Unique (cost=6,465,812.53..6,465,812.67 rows=1 width=3,374) (actual time=36,676.038..36,676.038 rows=0 loops=1)

2. 0.227 36,676.036 ↓ 0.0 0 1

Sort (cost=6,465,812.53..6,465,812.54 rows=1 width=3,374) (actual time=36,676.036..36,676.036 rows=0 loops=1)

  • Sort Key: registerdo0_.id, registerdo0_.register_document_id, registerdo0_.rec_status_id, registerdo0_.org_id, registerdo0_.card_document_type_id, registerdo0_.type_io_id, registerdo0_.register_entity_id, registerdo0_.created_date, registerdo0_.created_by, registerdo0_.last_modified_date, registerdo0_.last_modified_by, registerdo0_.change_user_id, registerdo0_.external_id, registerdo1_.external_id, registerdo1_.request_id, registerdo1_.register_document_number, registerdo1_.licensing_authority, registerdo1_.register_document_name, registerdo1_.register_document_date, registerdo1_.rec_status_id, registerdo1_.document_type_id, registerdo1_.outgoing, registerdo1_.org_id, registerdo1_.declarant_id, registerdo1_.outgoing_number, registerdo1_.outgoing_date, registerdo1_.incoming_number, registerdo1_.incoming_date, registerdo1_.holder_id, registerdo1_.doc_id, registerdo1_.sender_outgoing_date, registerdo1_.sheets, registerdo1_.in_out, registerdo1_.data_block_id, registerdo1_.is_special_order, registerdo1_.document_order, registerdo1_.created_date, registerdo1_.created_by, registerdo1_.last_modified_date, registerdo1_.last_modified_by, registerdo1_.document_id, registerdo1_.document_type_other, registerdo1_.change_user_id, registerdo1_.external_system_id, registerdo1_.version_id, registerdo1_.id, dge.name, dge.code, dge1.name, dge1.code, dge1.ext_id, file_storage.id, file_storage.file_name
  • Sort Method: quicksort Memory: 25kB
3. 0.023 36,675.809 ↓ 0.0 0 1

Hash Left Join (cost=2,312.80..6,465,812.52 rows=1 width=3,374) (actual time=36,675.809..36,675.809 rows=0 loops=1)

  • Hash Cond: (((dicglossar2_.id)::text = (dge1.glossary_type_id)::text) AND ((carddoctyp1_.id)::integer = dge1.ext_id))
4. 0.016 36,675.786 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,200.70..6,465,700.40 rows=1 width=2,491) (actual time=36,675.786..36,675.786 rows=0 loops=1)

5. 0.015 36,675.770 ↓ 0.0 0 1

Nested Loop (cost=2,100.70..6,465,581.31 rows=1 width=2,401) (actual time=36,675.770..36,675.770 rows=0 loops=1)

6. 0.016 36,675.755 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,100.14..6,465,578.51 rows=1 width=2,287) (actual time=36,675.755..36,675.755 rows=0 loops=1)

7. 0.029 36,675.739 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,100.00..6,465,577.25 rows=1 width=2,285) (actual time=36,675.739..36,675.739 rows=0 loops=1)

  • Join Filter: ((dge.code)::text = (registerdo1_.document_type_id)::text)
8. 0.014 36,675.710 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,000.00..6,465,465.03 rows=1 width=1,351) (actual time=36,675.710..36,675.710 rows=0 loops=1)

  • Join Filter: (((registerdo0_.version_id)::text = (registerdo1_.version_id)::text) AND ((registerdo0_.register_document_id)::text = (registerdo1_.external_id)::text))
9. 9.521 36,675.696 ↓ 0.0 0 1

Gather (cost=1,000.00..2,572,645.89 rows=1 width=468) (actual time=36,675.696..36,675.696 rows=0 loops=1)

  • Workers Planned: 8
  • Workers Launched: 1
10. 36,666.175 36,666.175 ↓ 0.0 0 2 / 2

Parallel Seq Scan on register_document_link registerdo0_ (cost=0.00..2,571,645.79 rows=1 width=468) (actual time=36,666.175..36,666.175 rows=0 loops=2)

  • Filter: ((rec_status_id = ANY ('{0,2}'::integer[])) AND ((version_id)::text = '64441d1c-3057-43c5-aecc-a1751097cb2f'::text) AND ((object_id)::text = '7B68CF72-26F2-4E3F-8051-04BB1E4D26DC'::text))
  • Rows Removed by Filter: 29337690
11. 0.000 0.000 ↓ 0.0 0

Gather (cost=1,000.00..3,892,794.56 rows=1,639 width=883) (never executed)

  • Workers Planned: 8
  • Workers Launched: 0
12. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on register_document registerdo1_ (cost=0.00..3,891,630.66 rows=205 width=883) (never executed)

  • Filter: ((version_id)::text = '64441d1c-3057-43c5-aecc-a1751097cb2f'::text)
13. 0.000 0.000 ↓ 0.0 0

Foreign Scan on dic_glossary_element dge (cost=100.00..111.69 rows=42 width=934) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_carddocumenttype on card_document_type carddoctyp1_ (cost=0.14..1.26 rows=1 width=2) (never executed)

  • Index Cond: (id = (registerdo0_.card_document_type_id)::text)
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Index Scan using file_storage_register_document_id_index on file_storage (cost=0.56..2.78 rows=1 width=114) (never executed)

  • Index Cond: (((register_document_id)::text = (registerdo0_.register_document_id)::text) AND (register_document_id IS NOT NULL))
  • Filter: (id IS NOT NULL)
16. 0.000 0.000 ↓ 0.0 0

Foreign Scan on dic_glossary_type dicglossar2_ (cost=100.00..119.06 rows=4 width=90) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Hash (cost=111.53..111.53 rows=38 width=1,028) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Foreign Scan on dic_glossary_element dge1 (cost=100.00..111.53 rows=38 width=1,028) (never executed)