explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kEUH

Settings
# exclusive inclusive rows x rows loops node
1. 1.524 495.646 ↓ 0.0 0 1

Insert on single_out (cost=131,115.31..131,211.09 rows=1,277 width=306) (actual time=495.646..495.646 rows=0 loops=1)

2. 0.533 494.122 ↑ 1.1 1,120 1

Subquery Scan on *SELECT* (cost=131,115.31..131,211.09 rows=1,277 width=306) (actual time=458.811..494.122 rows=1,120 loops=1)

3. 7.615 493.589 ↑ 1.1 1,120 1

Unique (cost=131,115.31..131,195.12 rows=1,277 width=346) (actual time=458.807..493.589 rows=1,120 loops=1)

4. 25.453 485.974 ↓ 13.9 17,761 1

WindowAgg (cost=131,115.31..131,169.58 rows=1,277 width=346) (actual time=458.805..485.974 rows=17,761 loops=1)

5. 64.448 459.821 ↓ 13.9 17,761 1

Sort (cost=131,109.27..131,112.46 rows=1,277 width=148) (actual time=457.842..459.821 rows=17,761 loops=1)

  • Sort Key: cc.transaction_amt, cc.state, cfm.cmte_nm, cc.transaction_dt, cc.name, cc.transaction_pgi, cc.city, cc.zip_code
  • Sort Method: quicksort Memory: 4831kB
6. 17.671 395.373 ↓ 13.9 17,761 1

Nested Loop Left Join (cost=1.15..131,043.38 rows=1,277 width=148) (actual time=3.863..395.373 rows=17,761 loops=1)

7. 23.448 359.941 ↓ 13.9 17,761 1

Nested Loop Left Join (cost=0.87..130,637.32 rows=1,277 width=140) (actual time=3.858..359.941 rows=17,761 loops=1)

8. 7.694 247.688 ↓ 13.9 17,761 1

Nested Loop (cost=0.58..130,244.64 rows=1,277 width=104) (actual time=3.829..247.688 rows=17,761 loops=1)

9. 0.090 0.090 ↓ 1.2 119 1

Function Scan on json_array_elements v1 (cost=0.00..1.00 rows=100 width=32) (actual time=0.051..0.090 rows=119 loops=1)

10. 239.904 239.904 ↓ 8.8 149 119

Index Scan using ix_contributions_fec_contributions_name_state_lw on contributions_fec_contributions cc (cost=0.57..1,302.27 rows=17 width=104) (actual time=0.590..2.016 rows=149 loops=119)

  • Index Cond: (lower((name)::text) = lower((v1.value ->> 0)))
  • Filter: (((transaction_tp IS NULL) OR ((transaction_tp)::text <> '24T'::text)) AND (transaction_dt >= '1970-01-01'::date) AND (transaction_dt <= '2019-06-10'::date) AND ((state IS NULL) OR (lower((state)::text) = lower((v1.value ->> 1)))))
  • Rows Removed by Filter: 573
11. 88.805 88.805 ↑ 1.0 1 17,761

Index Scan using contributions_fec_committees_pkey on contributions_fec_committees cfm (cost=0.29..0.31 rows=1 width=55) (actual time=0.005..0.005 rows=1 loops=17,761)

  • Index Cond: ((cc.cmte_id)::text = (cmte_id)::text)
12. 17.761 17.761 ↓ 0.0 0 17,761

Index Scan using contributions_fec_candidates_pkey on contributions_fec_candidates cfc (cost=0.29..0.32 rows=1 width=27) (actual time=0.001..0.001 rows=0 loops=17,761)

  • Index Cond: ((cfm.cand_id)::text = (cand_id)::text)
13.          

SubPlan (forWindowAgg)

14. 0.000 0.012 ↓ 0.0 0 1

ProjectSet (cost=2.25..2.77 rows=100 width=8) (actual time=0.012..0.012 rows=0 loops=1)

15. 0.002 0.012 ↑ 1.0 1 1

Aggregate (cost=2.25..2.26 rows=1 width=32) (actual time=0.012..0.012 rows=1 loops=1)

16. 0.010 0.010 ↓ 0.0 0 1

Function Scan on json_array_elements (cost=0.00..1.00 rows=100 width=32) (actual time=0.010..0.010 rows=0 loops=1)

17. 0.097 0.688 ↓ 11.7 1,166 1

ProjectSet (cost=2.25..2.77 rows=100 width=8) (actual time=0.593..0.688 rows=1,166 loops=1)

18. 0.344 0.591 ↑ 1.0 1 1

Aggregate (cost=2.25..2.26 rows=1 width=32) (actual time=0.591..0.591 rows=1 loops=1)

19. 0.247 0.247 ↓ 11.7 1,166 1

Function Scan on json_array_elements json_array_elements_1 (cost=0.00..1.00 rows=100 width=32) (actual time=0.184..0.247 rows=1,166 loops=1)