explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TXfV : Items view slow list EXPLAIN

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 35,955.646 ↓ 50.0 50 1

Limit (cost=50,053.96..50,053.96 rows=1 width=413) (actual time=35,955.638..35,955.646 rows=50 loops=1)

2. 16.116 35,955.642 ↓ 50.0 50 1

Sort (cost=50,053.96..50,053.96 rows=1 width=413) (actual time=35,955.637..35,955.642 rows=50 loops=1)

  • Sort Key: items_raw.id
  • Sort Method: top-N heapsort Memory: 67kB
3. 13,270.667 35,939.526 ↓ 3,104.0 3,104 1

Nested Loop (cost=1,004.37..50,053.95 rows=1 width=413) (actual time=949.834..35,939.526 rows=3,104 loops=1)

4. 13,216.216 18,379.131 ↓ 3,104.0 3,104 1

Nested Loop (cost=1,004.37..48,886.65 rows=1 width=333) (actual time=938.816..18,379.131 rows=3,104 loops=1)

5. 44.149 991.139 ↓ 3,104.0 3,104 1

Nested Loop (cost=1,004.37..47,719.36 rows=1 width=327) (actual time=928.102..991.139 rows=3,104 loops=1)

6. 0.037 3.382 ↓ 6.0 6 1

Nested Loop (cost=0.13..825.39 rows=1 width=26) (actual time=3.336..3.382 rows=6 loops=1)

7. 0.009 0.009 ↑ 1.0 8 1

Index Scan using slug_uidx on wms_systems ws (cost=0.13..12.25 rows=8 width=10) (actual time=0.004..0.009 rows=8 loops=1)

8. 0.020 3.336 ↓ 3.0 6 8

Materialize (cost=0..812.9 rows=2 width=21) (actual time=0.023..0.417 rows=6 loops=8)

9. 3.316 3.316 ↓ 3.0 6 1

Seq Scan on sfdc_xref_customer cx (cost=0..812.89 rows=2 width=21) (actual time=0.183..3.316 rows=6 loops=1)

  • Filter: ((lin_customer_enterprise_id__c)::text = '10123'::text)
10. 82.632 943.608 ↓ 121.3 15,773 6

Gather (cost=1,004.24..46,890.73 rows=130 width=319) (actual time=43.892..157.268 rows=15,773 loops=6)

11. 192.378 860.976 ↓ 97.4 5,258 18

Hash Join (cost=4.24..45,877.73 rows=54 width=319) (actual time=37.153..143.496 rows=5,258 loops=18)

12. 668.328 668.328 ↑ 1.2 206,855 18

Seq Scan on items_raw items_raw (cost=0..43,951.03 rows=256,256 width=307) (actual time=0.136..111.388 rows=206,855 loops=18)

  • Filter: ((deleted_at IS NULL) AND (created_at >= '2018-11-11 12:19:48.748+00'::timestamp with time zone) AND (created_at <= '2019-09-07 12:19:48.748+00'::timestamp with time zone))
13. 0.030 0.270 ↑ 1.0 1 13

Hash (cost=4.22..4.22 rows=1 width=16) (actual time=0.045..0.045 rows=1 loops=13)

14. 0.240 0.240 ↑ 1.0 1 13

Seq Scan on facility_warehouse_link fwl (cost=0..4.22 rows=1 width=16) (actual time=0.034..0.04 rows=1 loops=13)

  • Filter: ((facility_id)::integer = 1)
15. 4,171.776 4,171.776 ↑ 1.0 15,751 3,104

Seq Scan on sfdc_xref_customer cxb (cost=0..773.51 rows=15,751 width=21) (actual time=0.052..1.344 rows=15,751 loops=3,104)

16. 4,289.728 4,289.728 ↑ 1.0 15,751 3,104

Seq Scan on sfdc_xref_customer cxo (cost=0..773.51 rows=15,751 width=21) (actual time=0.047..1.382 rows=15,751 loops=3,104)