explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qSJO

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 110.591 ↑ 1.0 10 1

Limit (cost=46,748.72..46,748.74 rows=10 width=8) (actual time=110.586..110.591 rows=10 loops=1)

2. 0.014 110.584 ↑ 976.7 10 1

Sort (cost=46,748.72..46,773.13 rows=9,767 width=8) (actual time=110.584..110.584 rows=10 loops=1)

  • Sort Key: s.date_time_create DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 0.004 110.570 ↑ 424.7 23 1

Subquery Scan on s (cost=46,342.31..46,537.65 rows=9,767 width=8) (actual time=110.468..110.570 rows=23 loops=1)

4. 2.454 110.566 ↑ 424.7 23 1

HashAggregate (cost=46,342.31..46,439.98 rows=9,767 width=5,755) (actual time=110.466..110.566 rows=23 loops=1)

  • Group Key: o.id, o.id_ek5, o.number, o.date_time_create, o.user_created_code, o.order_type_code, o.note, o.true_delivery_mode_code, o.ek4_id, o.sender, o.sender_contragent_code, o.receiver, o.receiver_contragent_code, o.payer, o.payer_contragent_code, o.method_of_payment_code, o.payer_type_code, o.packages, o.volume_weight, o.calc_weight, o.online_shop, o.international, o.is_international, o.tariff_type_code, o.additional_services, o.discounts, o.extra_charges, o.common_currency_code, o.declared_cost_currency_code, o.cash_on_delivery_currency_code, o.delivery_price, o.from_office, o.order_status_code, o.order_additional_status_code, o.interface_code, o.responsible_for_delivery_branch_code, o.deleted, o.create_time, o.update_time, o.reverse_ek5_id, o.straight_ek5_id, o.total_amount, o.thresholds, o.real_weight, o.courier_invitation_code
5. 0.018 108.112 ↑ 232.5 42 1

Append (cost=0.56..45,243.53 rows=9,767 width=5,755) (actual time=0.123..108.112 rows=42 loops=1)

6. 64.693 64.693 ↑ 270.2 18 1

Index Scan using idx_order_sender_code on "order" o (cost=0.56..22,452.82 rows=4,864 width=1,976) (actual time=0.122..64.693 rows=18 loops=1)

  • Index Cond: ((sender_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: 22122
7. 0.060 0.060 ↑ 39.0 1 1

Index Scan using idx_order_receiver_code on "order" o_1 (cost=0.56..180.13 rows=39 width=1,976) (actual time=0.055..0.060 rows=1 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: 11
8. 43.341 43.341 ↑ 211.5 23 1

Index Scan using idx_order_payer_code on "order" o_2 (cost=0.56..22,464.07 rows=4,864 width=1,976) (actual time=0.056..43.341 rows=23 loops=1)

  • Index Cond: ((payer_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: 22236
Planning time : 2.270 ms
Execution time : 110.926 ms