explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NnBd : Optimization for: plan #aU3O

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=34,296.49..34,296.64 rows=1 width=217) (actual rows= loops=)

  • Group Key: rcv_performance_picking.rpp_code_worker, rcv_performance_picking.rpp_code_circuit, ((((((rcv_performance_picking.rpp_code_base)::text || (rcv_performance_picking.rpp_code_circuit)::text) || (rcv_performance_picking.rpp_code_worker)::text) || to_char((rcv_performance_picking.rpp_date_prep)::timestamp with time zone, 'yyyyMMdd'::text)))::character varying), rcv_performance_picking.rpp_name_worker, rcv_performance_picking.rpp_name_circuit, rcv_performance_picking.rpp_date_prep, rcv_performance_picking.rpp_code_base
2. 0.000 0.000 ↓ 0.0

Sort (cost=34,296.49..34,296.50 rows=1 width=217) (actual rows= loops=)

  • Sort Key: rcv_performance_picking.rpp_code_worker, rcv_performance_picking.rpp_code_circuit, ((((((rcv_performance_picking.rpp_code_base)::text || (rcv_performance_picking.rpp_code_circuit)::text) || (rcv_performance_picking.rpp_code_worker)::text) || to_char((rcv_performance_picking.rpp_date_prep)::timestamp with time zone, 'yyyyMMdd'::text)))::character varying), rcv_performance_picking.rpp_name_worker, rcv_performance_picking.rpp_name_circuit, rcv_performance_picking.rpp_date_prep, rcv_performance_picking.rpp_code_base
3. 0.000 0.000 ↓ 0.0

Subquery Scan on rcv_performance_picking (cost=28,180.03..34,296.48 rows=1 width=217) (actual rows= loops=)

  • Filter: ((rcv_performance_picking.rpp_date_prep = '2019-06-05'::date) AND ((rcv_performance_picking.rpp_code_base)::text = '010'::text) AND ((rcv_performance_picking.rpp_code_worker)::text = '485'::text))
4. 0.000 0.000 ↓ 0.0

WindowAgg (cost=28,180.03..34,063.35 rows=13,321 width=122) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Merge Join (cost=28,180.03..32,831.16 rows=13,321 width=122) (actual rows= loops=)

  • Merge Cond: (((rcv_worker.rw_code_base)::text = (rcv_picking.rp_code_base)::text) AND ((rcv_worker.rw_code_worker)::text = (rcv_picking.rp_code_worker)::text))
6. 0.000 0.000 ↓ 0.0

Index Scan using pk_worker on rcv_worker (cost=0.29..3,423.55 rows=33,487 width=25) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Materialize (cost=28,019.76..28,563.36 rows=108,721 width=115) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Sort (cost=28,019.76..28,291.56 rows=108,721 width=115) (actual rows= loops=)

  • Sort Key: rcv_picking.rp_code_base, rcv_picking.rp_code_worker
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=52.32..12,711.10 rows=108,721 width=115) (actual rows= loops=)

  • Hash Cond: (((rcv_picking.rp_code_base)::text = (rcv_base.rb_code_base)::text) AND ((rcv_picking.rp_code_circuit)::text = (rcv_circuit.rc_code_circuit)::text))
10. 0.000 0.000 ↓ 0.0

Seq Scan on rcv_picking (cost=0.00..6,449.15 rows=240,715 width=93) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=40.64..40.64 rows=779 width=26) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.14..40.64 rows=779 width=26) (actual rows= loops=)

  • Hash Cond: ((rcv_circuit.rc_code_base)::text = (rcv_base.rb_code_base)::text)
13. 0.000 0.000 ↓ 0.0

Seq Scan on rcv_circuit (cost=0.00..25.79 rows=779 width=22) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=2.95..2.95 rows=95 width=4) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on rcv_base (cost=0.00..2.95 rows=95 width=4) (actual rows= loops=)