explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7asi

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 450.761 ↑ 1.0 50 1

Limit (cost=775,927.86..775,927.99 rows=50 width=190) (actual time=450.736..450.761 rows=50 loops=1)

2. 4.103 450.749 ↑ 9.1 50 1

Sort (cost=775,927.86..775,929.00 rows=454 width=190) (actual time=450.732..450.749 rows=50 loops=1)

  • Sort Key: doc.received_date DESC, edi_orders.document_id
  • Sort Method: top-N heapsort Memory: 39kB
3. 42.382 446.646 ↓ 8.6 3,883 1

Nested Loop (cost=0.85..775,912.78 rows=454 width=190) (actual time=87.724..446.646 rows=3,883 loops=1)

4. 151.448 151.448 ↓ 1.7 63,204 1

Index Scan using idx_ls_document_dd on ls_document doc (cost=0.43..14,302.31 rows=37,928 width=90) (actual time=51.310..151.448 rows=63,204 loops=1)

  • Index Cond: ((received_date <= '2019-11-28 23:59:58'::timestamp without time zone) AND (received_date >= '2019-11-28 00:00:00'::timestamp without time zone))
  • Filter: (trash_timestamp IS NULL)
5. 252.816 252.816 ↓ 0.0 0 63,204

Index Scan using idx_edi_order_document_id_unq on ls_document_edi_order edi_orders (cost=0.42..20.07 rows=1 width=100) (actual time=0.004..0.004 rows=0 loops=63,204)

  • Index Cond: (document_id = doc.id)
  • Filter: (SubPlan 1)
  • -> Index Only Scan using ls_user_to_document_invisibility_user_id_document_id_key on ls_user_to_document_visibility usertodocu1_ (cost=0.57..38.32 rows=38 width=8) (actual time=0.051
  • Index Cond: ((user_id = 24) AND (document_id = edi_orders.document_id))
  • Heap Fetches: 3883
Planning time : 30.946 ms
Execution time : 450.961 ms