explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 7e7 : Postgresql slow query explain analyze

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.001 1887657.013 ↓ 0.0 0 1

Limit (cost=0.00..1388733.68 rows=1000 width=138) (actual time=1887657.013..1887657.013 rows=0 loops=1)

2. 46807.216 1887657.012 ↓ 0.0 0 1

Nested Loop (cost=0.00..31471007691.03 rows=22661658 width=138) (actual time=1887657.012..1887657.012 rows=0 loops=1)

  • Join Filter: (u."RoleId" = r."Id")
3. 0.000 1840849.796 ↑ 1.0 343063334 1

Nested Loop (cost=0.00..31465859566.41 rows=343208229 width=122) (actual time=1.018..1840849.796 rows=343063334 loops=1)

4. 70187.874 805593.748 ↑ 1.0 346511117 1

Nested Loop (cost=0.00..17722559954.00 rows=346710000 width=42) (actual time=0.586..805593.748 rows=346511117 loops=1)

5. 35405.874 35405.874 ↑ 1.0 350000000 1

Seq Scan on "Payments" p (cost=0.00..5724570.00 rows=350000000 width=18) (actual time=0.019..35405.874 rows=350000000 loops=1)

6. 700000.000 700000.000 ↑ 1.0 1 350000000

Index Scan using "PaymentOrders_pkey" on "PaymentOrders" po (cost=0.00..50.61 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=350000000)

  • Index Cond: ("Id" = p."PaymentOrderId")
7. 1039533.351 1039533.351 ↑ 1.0 1 346511117

Index Scan using "Users_pkey" on "Users" u (cost=0.00..39.63 rows=1 width=80) (actual time=0.002..0.003 rows=1 loops=346511117)

  • Index Cond: ("Id" = po."UserId")
8. 0.000 0.000 ↓ 0.0 0 343063334

Materialize (cost=0.00..1.19 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=343063334)

9. 0.016 0.016 ↓ 0.0 0 1

Seq Scan on "Roles" r (cost=0.00..1.19 rows=1 width=16) (actual time=0.016..0.016 rows=0 loops=1)

  • Filter: (("Name")::text = 'Moses2333'::text)
  • Rows Removed by Filter: 15