explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fGtj

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 1,919.934 ↓ 10.0 10 1

Limit (cost=180,926.92..180,926.92 rows=1 width=96) (actual time=1,919.930..1,919.934 rows=10 loops=1)

2. 0.503 1,919.931 ↓ 10.0 10 1

Sort (cost=180,926.92..180,926.92 rows=1 width=96) (actual time=1,919.929..1,919.931 rows=10 loops=1)

  • Sort Key: backup.id
  • Sort Method: top-N heapsort Memory: 26kB
3. 0.549 1,919.428 ↓ 413.0 413 1

Nested Loop (cost=9,639.21..180,926.91 rows=1 width=96) (actual time=17.601..1,919.428 rows=413 loops=1)

  • Join Filter: (backup.cliente_id = cliente.id)
4. 1,135.601 1,916.401 ↓ 413.0 413 1

Nested Loop Semi Join (cost=9,638.79..180,919.41 rows=1 width=76) (actual time=17.590..1,916.401 rows=413 loops=1)

  • Join Filter: (backup.cliente_id = backup_implantacao.cliente_id)
  • Rows Removed by Join Filter: 15,622,663
5. 1.543 42.524 ↓ 654.5 1,309 1

Nested Loop (cost=9,638.79..178,634.89 rows=2 width=68) (actual time=6.190..42.524 rows=1,309 loops=1)

6. 1.899 33.049 ↓ 45.1 1,983 1

Nested Loop (cost=9,638.50..178,310.92 rows=44 width=4) (actual time=6.142..33.049 rows=1,983 loops=1)

7. 19.854 23.218 ↓ 45.1 1,983 1

Bitmap Heap Scan on licenca_produto licencaproduto (cost=9,638.08..177,947.34 rows=44 width=4) (actual time=6.131..23.218 rows=1,983 loops=1)

  • Recheck Cond: (id_aplicativo_updc = 2,207,237)
  • Filter: (permissao @> '{"utilizar": true}'::jsonb)
  • Rows Removed by Filter: 3,006
  • Heap Blocks: exact=16,496
8. 3.364 3.364 ↑ 2.7 16,614 1

Bitmap Index Scan on idx_licencaproduto_idaplicativo (cost=0.00..9,638.07 rows=44,468 width=0) (actual time=3.364..3.364 rows=16,614 loops=1)

  • Index Cond: (id_aplicativo_updc = 2,207,237)
9. 7.932 7.932 ↑ 1.0 1 1,983

Index Scan using licenca_pkey on licenca (cost=0.42..8.25 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1,983)

  • Index Cond: (id = licencaproduto.id_licenca)
10. 7.932 7.932 ↑ 1.0 1 1,983

Index Scan using uk_cliente_id on backup (cost=0.29..7.35 rows=1 width=64) (actual time=0.004..0.004 rows=1 loops=1,983)

  • Index Cond: (cliente_id = licenca.id_cliente)
  • Filter: (cloud_size > 0)
  • Rows Removed by Filter: 0
11. 732.736 738.276 ↓ 1.1 11,935 1,309

Materialize (cost=0.00..1,992.80 rows=11,232 width=8) (actual time=0.000..0.564 rows=11,935 loops=1,309)

12. 5.540 5.540 ↓ 1.3 14,853 1

Seq Scan on backup_implantacao (cost=0.00..1,936.64 rows=11,232 width=8) (actual time=0.004..5.540 rows=14,853 loops=1)

  • Filter: (NOT implantado)
  • Rows Removed by Filter: 7,612
13. 2.478 2.478 ↑ 1.0 1 413

Index Scan using pk_cliente_id on cliente (cost=0.42..7.48 rows=1 width=48) (actual time=0.006..0.006 rows=1 loops=413)

  • Index Cond: (id = licenca.id_cliente)
  • Filter: (NOT inadimplente)