explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x38Q

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 0.417 ↑ 10.0 1 1

Limit (cost=16,444.66..16,514.56 rows=10 width=310) (actual time=0.364..0.417 rows=1 loops=1)

2. 0.151 0.416 ↑ 13,961.0 1 1

Nested Loop Left Join (cost=16,444.66..114,024.41 rows=13,961 width=310) (actual time=0.363..0.416 rows=1 loops=1)

3. 0.003 0.264 ↑ 13,961.0 1 1

Nested Loop Left Join (cost=16,444.10..84,336.83 rows=13,961 width=471) (actual time=0.212..0.264 rows=1 loops=1)

4. 0.004 0.260 ↑ 13,961.0 1 1

Nested Loop (cost=16,443.54..54,893.57 rows=13,961 width=477) (actual time=0.209..0.260 rows=1 loops=1)

5. 0.088 0.247 ↑ 13,961.0 1 1

HashAggregate (cost=16,442.97..16,582.58 rows=13,961 width=17) (actual time=0.196..0.247 rows=1 loops=1)

  • Group Key: o1.id, o1.deleted
6. 0.002 0.159 ↑ 6,980.5 2 1

Append (cost=0.56..16,373.17 rows=13,961 width=17) (actual time=0.031..0.159 rows=2 loops=1)

7. 0.031 0.031 ↑ 6,957.0 1 1

Index Scan using idx_order_sender_code_date_deleted_ex on "order" o1 (cost=0.56..7,978.92 rows=6,957 width=17) (actual time=0.031..0.031 rows=1 loops=1)

  • Index Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (deleted = false) AND (date_time_create >= '2019-08-07 00:00:00'::timestamp without time zone) AND (date_time_create <= '2019-09-07 23:59:59'::timestamp without time zone))
  • Filter: (NOT deleted)
8. 0.098 0.098 ↓ 0.0 0 1

Index Scan using idx_order_receiver_code on "order" o1_1 (cost=0.56..205.91 rows=47 width=17) (actual time=0.098..0.098 rows=0 loops=1)

  • Index Cond: ((receiver_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
  • Filter: ((NOT deleted) AND (date_time_create >= '2019-08-07 00:00:00'::timestamp without time zone) AND (date_time_create <= '2019-09-07 23:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 13
9. 0.028 0.028 ↑ 6,957.0 1 1

Index Scan using idx_order_sender_code_date_deleted_ex on "order" o1_2 (cost=0.56..7,978.92 rows=6,957 width=17) (actual time=0.027..0.028 rows=1 loops=1)

  • Index Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (deleted = false) AND (date_time_create >= '2019-08-07 00:00:00'::timestamp without time zone) AND (date_time_create <= '2019-09-07 23:59:59'::timestamp without time zone))
  • Filter: (NOT deleted)
10. 0.009 0.009 ↑ 1.0 1 1

Index Scan using "idx-order_id" on "order" o (cost=0.56..2.73 rows=1 width=493) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = o1.id)
11. 0.001 0.001 ↓ 0.0 0 1

Index Scan using "idx-order_id_ek5" on "order" ro (cost=0.56..2.11 rows=1 width=26) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (o.reverse_ek5_id = id_ek5)
12. 0.001 0.001 ↓ 0.0 0 1

Index Scan using "idx-order_id_ek5" on "order" so (cost=0.56..2.11 rows=1 width=26) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (o.straight_ek5_id = id_ek5)
Planning time : 2.241 ms
Execution time : 0.590 ms