explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vf7r

Settings
# exclusive inclusive rows x rows loops node
1. 0.621 18.908 ↑ 9.0 147 1

Unique (cost=137,699.90..137,782.28 rows=1,318 width=346) (actual time=16.798..18.908 rows=147 loops=1)

2. 1.438 18.287 ↑ 3.2 416 1

WindowAgg (cost=137,699.90..137,755.92 rows=1,318 width=346) (actual time=16.796..18.287 rows=416 loops=1)

3. 1.713 16.810 ↑ 3.2 416 1

Sort (cost=137,693.86..137,697.15 rows=1,318 width=148) (actual time=16.725..16.810 rows=416 loops=1)

  • Sort Key: cc.transaction_amt, cc.state, cc.cmte_nm, cc.transaction_dt, cc.name, cc.transaction_pgi, cc.city, cc.zip_code
  • Sort Method: quicksort Memory: 114kB
4. 0.438 15.097 ↑ 3.2 416 1

Subquery Scan on cc (cost=137,609.08..137,625.56 rows=1,318 width=148) (actual time=14.590..15.097 rows=416 loops=1)

5. 0.603 14.659 ↑ 3.2 416 1

Sort (cost=137,609.08..137,612.38 rows=1,318 width=12,876) (actual time=14.587..14.659 rows=416 loops=1)

  • Sort Key: cc_1.created_dt
  • Sort Method: quicksort Memory: 124kB
6. 1.799 14.056 ↑ 3.2 416 1

Nested Loop Left Join (cost=1.15..133,282.93 rows=1,318 width=12,876) (actual time=0.095..14.056 rows=416 loops=1)

7. 0.718 11.425 ↑ 3.2 416 1

Nested Loop Left Join (cost=0.87..132,863.84 rows=1,318 width=140) (actual time=0.088..11.425 rows=416 loops=1)

8. 0.507 6.963 ↑ 3.2 416 1

Nested Loop (cost=0.58..132,458.54 rows=1,318 width=104) (actual time=0.071..6.963 rows=416 loops=1)

9. 0.031 0.031 ↑ 4.0 25 1

Function Scan on json_array_elements v1 (cost=0.00..1.00 rows=100 width=32) (actual time=0.021..0.031 rows=25 loops=1)

10. 6.425 6.425 ↑ 1.1 17 25

Index Scan using ix_contributions_fec_contributions_name_state_lw on contributions_fec_contributions cc_1 (cost=0.57..1,324.40 rows=18 width=104) (actual time=0.153..0.257 rows=17 loops=25)

  • Index Cond: (lower((name)::text) = lower((v1.value ->> 0)))
  • Filter: (((transaction_tp IS NULL) OR ((transaction_tp)::text <> '24T'::text)) AND ((state IS NULL) OR (lower((state)::text) = lower((v1.value ->> 1)))))
  • Rows Removed by Filter: 37
11. 3.744 3.744 ↑ 1.0 1 416

Index Scan using contributions_fec_committees_pkey on contributions_fec_committees cfm (cost=0.29..0.31 rows=1 width=55) (actual time=0.009..0.009 rows=1 loops=416)

  • Index Cond: ((cc_1.cmte_id)::text = (cmte_id)::text)
12. 0.832 0.832 ↓ 0.0 0 416

Index Scan using contributions_fec_candidates_pkey on contributions_fec_candidates cfc (cost=0.29..0.32 rows=1 width=27) (actual time=0.002..0.002 rows=0 loops=416)

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

SubPlan (forWindowAgg)

14. 0.002 0.015 ↓ 0.0 0 1

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

15. 0.003 0.013 ↑ 1.0 1 1

Aggregate (cost=2.25..2.26 rows=1 width=32) (actual time=0.013..0.013 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.005 0.024 ↑ 50.0 2 1

ProjectSet (cost=2.25..2.77 rows=100 width=8) (actual time=0.023..0.024 rows=2 loops=1)

18. 0.011 0.019 ↑ 1.0 1 1

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

19. 0.008 0.008 ↑ 50.0 2 1

Function Scan on json_array_elements json_array_elements_1 (cost=0.00..1.00 rows=100 width=32) (actual time=0.008..0.008 rows=2 loops=1)

Planning time : 2.225 ms
Execution time : 19.286 ms