explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5HiI

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 6.973 ↓ 2.0 2 1

Nested Loop (cost=147.81..175.00 rows=1 width=8) (actual time=6.695..6.973 rows=2 loops=1)

2.          

Initplan (forNested Loop)

3. 0.047 6.215 ↑ 1.0 1 1

Aggregate (cost=147.22..147.23 rows=1 width=4) (actual time=6.212..6.215 rows=1 loops=1)

4. 0.635 6.168 ↓ 9.0 9 1

Nested Loop (cost=0.85..147.22 rows=1 width=4) (actual time=0.728..6.168 rows=9 loops=1)

5. 0.870 4.298 ↓ 3.2 95 1

Nested Loop (cost=0.58..137.56 rows=30 width=8) (actual time=0.277..4.298 rows=95 loops=1)

6. 0.978 0.978 ↓ 3.3 49 1

Index Scan using pgpro__documents_set___government_list_body_id on documents_set docset_1 (cost=0.29..10.66 rows=15 width=8) (actual time=0.151..0.978 rows=49 loops=1)

  • Index Cond: (government_list_body_id = 690470)
7. 2.450 2.450 ↑ 1.0 2 49

Index Scan using ix_documents_set_docs_1 on documents_set_docs docsetdoc_1 (cost=0.29..8.44 rows=2 width=16) (actual time=0.043..0.050 rows=2 loops=49)

  • Index Cond: (documents_set_id = docset_1.documents_set_id)
8. 1.235 1.235 ↓ 0.0 0 95

Index Scan using pgpro_documents_set_apostille_docs_zags_list_doc_set_docs_id on documents_set_apostille_docs aposdocs_1 (cost=0.27..0.31 rows=1 width=12) (actual time=0.012..0.013 rows=0 loops=95)

  • Index Cond: (documents_set_docs_id = docsetdoc_1.documents_set_docs_id)
  • Filter: ((apostille_date >= date_trunc('year'::text, now())) AND (apostille_date <= (date_trunc('year'::text, (now() + '1 year'::interval)) - '00:00:01'::interval)))
  • Rows Removed by Filter: 0
9. 0.022 6.853 ↓ 2.0 2 1

Nested Loop (cost=0.29..27.45 rows=1 width=16) (actual time=6.597..6.853 rows=2 loops=1)

10. 6.803 6.803 ↓ 2.0 2 1

Seq Scan on documents_set_apostille_docs aposdocs (cost=0.00..19.14 rows=1 width=16) (actual time=6.576..6.803 rows=2 loops=1)

  • Filter: (apostille_number = $2)
  • Rows Removed by Filter: 492
11. 0.028 0.028 ↑ 1.0 1 2

Index Scan using documents_set_docs_pkey on documents_set_docs docsetdoc (cost=0.29..8.31 rows=1 width=16) (actual time=0.010..0.014 rows=1 loops=2)

  • Index Cond: (documents_set_docs_id = aposdocs.documents_set_docs_id)
12. 0.084 0.084 ↑ 1.0 1 2

Index Only Scan using documents_set_pkey on documents_set docset (cost=0.29..0.33 rows=1 width=8) (actual time=0.041..0.042 rows=1 loops=2)

  • Index Cond: (documents_set_id = docsetdoc.documents_set_id)
  • Heap Fetches: 2
Planning time : 4.914 ms
Execution time : 7.459 ms