explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SPLy

Settings

Optimization(s) for this plan:

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

GroupAggregate (cost=13,204,453.03..13,204,454.90 rows=44 width=133) (actual rows= loops=)

  • Group Key: latest_rnk.filing_seq, eqr_transactions_2018_3q.filing_quarter, eps_curve_definitions.region_cd, eqr_transactions_2018_3q.product_nm, eqr_transactions_2018_3q.customer_company_nm, eqr_transactions_2018_3q.pt_del_bal_authority, eqr_transactions_2018_3q.pt_del_spec_location, (lag((count(eqr_transactions_2019_4q_1.transaction_unique_id)), 1) OVER (?)), (rank() OVER (?))
2. 0.000 0.000 ↓ 0.0

Sort (cost=13,204,453.03..13,204,453.14 rows=44 width=133) (actual rows= loops=)

  • Sort Key: latest_rnk.filing_seq, eqr_transactions_2018_3q.filing_quarter, eps_curve_definitions.region_cd, eqr_transactions_2018_3q.product_nm, eqr_transactions_2018_3q.customer_company_nm, eqr_transactions_2018_3q.pt_del_bal_authority, eqr_transactions_2018_3q.pt_del_spec_location, (lag((count(eqr_transactions_2019_4q_1.transaction_unique_id)), 1) OVER (?)), (rank() OVER (?))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7,716,066.60..13,204,451.83 rows=44 width=133) (actual rows= loops=)

  • -> Index Scan using eps_curve_definitions_pk on eps_curve_definitions (cost=0.28..0.30 rows=1 width=10)" Index Cond: (curve_num = eqr_transactions_2018_3q.curve_num)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7,716,066.32..13,204,438.63 rows=44 width=133) (actual rows= loops=)

  • Join Filter: ((latest_rnk.filing_seq)::text = (eqr_transactions_2019_4q_1.filing_seq)::text)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6.22..5,487,853.65 rows=1 width=154) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Subquery Scan on latest_rnk (cost=6.09..6.12 rows=1 width=34) (actual rows= loops=)

  • Filter: (latest_rnk.rownumber <= 6)
7. 0.000 0.000 ↓ 0.0

WindowAgg (cost=6.09..6.11 rows=1 width=560) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Sort (cost=6.09..6.09 rows=1 width=42) (actual rows= loops=)

  • Sort Key: latest.filing_quarter DESC
9. 0.000 0.000 ↓ 0.0

Subquery Scan on latest (cost=4.99..6.08 rows=1 width=42) (actual rows= loops=)

  • Filter: (latest.rnk = '1'::bigint)
10. 0.000 0.000 ↓ 0.0

WindowAgg (cost=4.99..5.69 rows=31 width=341) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Sort (cost=4.99..5.07 rows=31 width=57) (actual rows= loops=)

  • Sort Key: eqr_filing.filing_quarter, eqr_filing.filing_type, eqr_filing.last_modified_dt DESC
12. 0.000 0.000 ↓ 0.0

Seq Scan on eqr_filing (cost=0.00..4.22 rows=31 width=57) (actual rows= loops=)

  • Filter: (((process_stage)::text = 'Final'::text) AND (((filing_seq)::text = '814d8240-0094-4bbb-a388-659f7821d3f1'::text) OR ((filing_type)::text = 'Initial'::text)))
13. 0.000 0.000 ↓ 0.0

Append (cost=0.14..5,206,335.09 rows=28,151,244 width=120) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using eqr_transactions_2018_3q_idx1 on eqr_transactions_2018_3q (cost=0.14..8.16 rows=1 width=1,824) (actual rows= loops=)

  • Index Cond: ((filing_seq)::text = (latest_rnk.filing_seq)::text)
  • Filter: (filing_quarter = ANY ('{"2018-07-01 00:00:00","2018-10-01 00:00:00","2019-10-01 00:00:00","2019-04-01 00:00:00","2019-07-01 00:00:00"}'::timestamp without time zone[]))
15. 0.000 0.000 ↓ 0.0

Seq Scan on eqr_transactions_2018_4q (cost=0.00..1,623,219.77 rows=9,048,234 width=121) (actual rows= loops=)

  • Filter: (((latest_rnk.filing_seq)::text = (filing_seq)::text) AND (filing_quarter = ANY ('{"2018-07-01 00:00:00","2018-10-01 00:00:00","2019-10-01 00:00:00","2019-04-01 00:00:00","2019-07-01 00:00:00"}'::timestamp without time zone[])))
16. 0.000 0.000 ↓ 0.0

Index Scan using eqr_transactions_2019_2q_idx1 on eqr_transactions_2019_2q (cost=0.56..1,063,603.66 rows=8,615,920 width=121) (actual rows= loops=)

  • Index Cond: ((filing_seq)::text = (latest_rnk.filing_seq)::text)
  • Filter: (filing_quarter = ANY ('{"2018-07-01 00:00:00","2018-10-01 00:00:00","2019-10-01 00:00:00","2019-04-01 00:00:00","2019-07-01 00:00:00"}'::timestamp without time zone[]))
17. 0.000 0.000 ↓ 0.0

Seq Scan on eqr_transactions_2019_3q (cost=0.00..1,511,462.08 rows=8,434,722 width=121) (actual rows= loops=)

  • Filter: (((latest_rnk.filing_seq)::text = (filing_seq)::text) AND (filing_quarter = ANY ('{"2018-07-01 00:00:00","2018-10-01 00:00:00","2019-10-01 00:00:00","2019-04-01 00:00:00","2019-07-01 00:00:00"}'::timestamp without time zone[])))
18. 0.000 0.000 ↓ 0.0

Index Scan using eqr_transactions_2019_4q_idx1 on eqr_transactions_2019_4q (cost=0.56..867,285.20 rows=2,052,367 width=119) (actual rows= loops=)

  • Index Cond: ((filing_seq)::text = (latest_rnk.filing_seq)::text)
  • Filter: (filing_quarter = ANY ('{"2018-07-01 00:00:00","2018-10-01 00:00:00","2019-10-01 00:00:00","2019-04-01 00:00:00","2019-07-01 00:00:00"}'::timestamp without time zone[]))
19. 0.000 0.000 ↓ 0.0

WindowAgg (cost=7,716,060.10..7,716,388.15 rows=8,748 width=107) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

WindowAgg (cost=7,716,060.10..7,716,256.93 rows=8,748 width=83) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Sort (cost=7,716,060.10..7,716,081.97 rows=8,748 width=75) (actual rows= loops=)

  • Sort Key: eqr_transactions_2019_4q_1.filing_quarter, eqr_transactions_2019_4q_1.customer_company_nm, (count(eqr_transactions_2019_4q_1.transaction_unique_id)) DESC
22. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=7,710,860.18..7,715,487.33 rows=8,748 width=75) (actual rows= loops=)

  • Group Key: eqr_transactions_2019_4q_1.filing_seq, eqr_transactions_2019_4q_1.filing_quarter, eqr_transactions_2019_4q_1.customer_company_nm
23. 0.000 0.000 ↓ 0.0

Gather Merge (cost=7,710,860.18..7,715,049.93 rows=34,992 width=75) (actual rows= loops=)

  • Workers Planned: 4
24. 0.000 0.000 ↓ 0.0

Sort (cost=7,709,860.12..7,709,881.99 rows=8,748 width=75) (actual rows= loops=)

  • Sort Key: eqr_transactions_2019_4q_1.filing_seq, eqr_transactions_2019_4q_1.filing_quarter, eqr_transactions_2019_4q_1.customer_company_nm
25. 0.000 0.000 ↓ 0.0

Partial HashAggregate (cost=7,709,199.88..7,709,287.36 rows=8,748 width=75) (actual rows= loops=)

  • Group Key: eqr_transactions_2019_4q_1.filing_seq, eqr_transactions_2019_4q_1.filing_quarter, eqr_transactions_2019_4q_1.customer_company_nm
26. 0.000 0.000 ↓ 0.0

Parallel Append (cost=0.00..7,483,092.30 rows=22,610,758 width=75) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2019_4q eqr_transactions_2019_4q_1 (cost=0.00..2,238,028.17 rows=5,130,918 width=75) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2018_4q eqr_transactions_2018_4q_1 (cost=0.00..1,329,152.17 rows=4,524,117 width=75) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2019_1q (cost=0.00..1,295,556.04 rows=4,411,104 width=75) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2019_2q eqr_transactions_2019_2q_1 (cost=0.00..1,264,182.60 rows=4,307,960 width=75) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2019_3q eqr_transactions_2019_3q_1 (cost=0.00..1,237,333.61 rows=4,217,361 width=75) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2020_1q (cost=0.00..5,464.03 rows=32,003 width=75) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_least_qp (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2012_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2012_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2012_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2012_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2013_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2013_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2013_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2013_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2014_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2014_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2014_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2014_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2015_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2015_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2015_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2015_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2016_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2016_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2016_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2016_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2017_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2017_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2017_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2017_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2018_1q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2018_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2018_3q eqr_transactions_2018_3q_1 (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2020_2q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2020_3q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_2020_4q (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on eqr_transactions_default (cost=0.00..10.06 rows=6 width=75) (actual rows= loops=)