explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Udkz

Settings
# exclusive inclusive rows x rows loops node
1. 0.090 5.153 ↓ 218.0 218 1

Sort (cost=426.98..426.98 rows=1 width=93) (actual time=5.143..5.153 rows=218 loops=1)

  • Sort Key: pedidovend0_.dt_pedido DESC, pedidovend0_.number DESC
  • Sort Method: quicksort Memory: 55kB
2. 0.275 5.063 ↓ 218.0 218 1

GroupAggregate (cost=426.94..426.97 rows=1 width=93) (actual time=4.754..5.063 rows=218 loops=1)

  • Group Key: pedidovend0_.id_pedido_venda, attachment2_.action, attachment2_.actiondate
3. 0.467 4.788 ↓ 999.0 999 1

Sort (cost=426.94..426.95 rows=1 width=66) (actual time=4.744..4.788 rows=999 loops=1)

  • Sort Key: pedidovend0_.id_pedido_venda, attachment2_.action, attachment2_.actiondate
  • Sort Method: quicksort Memory: 165kB
4. 0.728 4.321 ↓ 999.0 999 1

Nested Loop (cost=1.87..426.93 rows=1 width=66) (actual time=0.052..4.321 rows=999 loops=1)

5. 0.238 2.594 ↓ 999.0 999 1

Nested Loop (cost=1.30..425.23 rows=1 width=66) (actual time=0.045..2.594 rows=999 loops=1)

6. 0.107 1.484 ↓ 218.0 218 1

Nested Loop (cost=0.86..420.70 rows=1 width=69) (actual time=0.038..1.484 rows=218 loops=1)

7. 0.637 0.637 ↓ 7.3 370 1

Index Scan using idx_pedv_tenant on ef_pedido_venda pedidovend0_ (cost=0.43..285.41 rows=51 width=47) (actual time=0.015..0.637 rows=370 loops=1)

  • Index Cond: (tenant_id = 1,159,218)
  • Filter: ((dt_cancelamento IS NULL) AND (dt_faturamento IS NULL))
  • Rows Removed by Filter: 287
8. 0.740 0.740 ↑ 1.0 1 370

Index Scan using uk_attachmentsummary_saleorder_id on attachmentsummary attachment2_ (cost=0.43..2.65 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=370)

  • Index Cond: (saleorder_id = pedidovend0_.id_pedido_venda)
  • Filter: (tenant_id = 1,159,218)
9. 0.872 0.872 ↑ 7.8 5 218

Index Scan using xif1ef_pedido_venda_item on ef_pedido_venda_item pedidovend1_ (cost=0.44..4.13 rows=39 width=13) (actual time=0.003..0.004 rows=5 loops=218)

  • Index Cond: (id_pedido_venda = pedidovend0_.id_pedido_venda)
10. 0.999 0.999 ↑ 1.0 1 999

Index Only Scan using ef_pessoa_pkey on ef_pessoa cliente3_ (cost=0.57..1.71 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=999)

  • Index Cond: (id_pessoa = pedidovend0_.id_cliente)
  • Heap Fetches: 24
Planning time : 0.911 ms
Execution time : 5.214 ms