explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BodU

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 2,739.948 ↑ 1.8 12 1

Nested Loop Left Join (cost=208,904.65..208,998.74 rows=21 width=243) (actual time=2,739.365..2,739.948 rows=12 loops=1)

2. 0.011 2,739.880 ↑ 1.0 10 1

Nested Loop Left Join (cost=208,904.22..208,971.08 rows=10 width=227) (actual time=2,739.345..2,739.880 rows=10 loops=1)

3. 0.014 2,739.799 ↑ 1.0 10 1

Nested Loop Left Join (cost=208,903.94..208,950.50 rows=10 width=196) (actual time=2,739.310..2,739.799 rows=10 loops=1)

4. 0.022 2,739.715 ↑ 1.0 10 1

Nested Loop Left Join (cost=208,903.50..208,923.90 rows=10 width=184) (actual time=2,739.283..2,739.715 rows=10 loops=1)

5. 0.004 2,738.923 ↑ 1.0 10 1

Limit (cost=208,903.23..208,903.25 rows=10 width=128) (actual time=2,738.918..2,738.923 rows=10 loops=1)

6. 22.314 2,738.919 ↑ 4,320.4 10 1

Sort (cost=208,903.23..209,011.24 rows=43,204 width=128) (actual time=2,738.917..2,738.919 rows=10 loops=1)

  • Sort Key: "Recebimento".data_transacao DESC
  • Sort Method: top-N heapsort Memory: 30kB
7. 2,716.605 2,716.605 ↑ 1.1 37,959 1

Index Scan using idx_recebimentos_eid_dt_sr on recebimentos "Recebimento" (cost=0.56..207,969.60 rows=43,204 width=128) (actual time=0.960..2,716.605 rows=37,959 loops=1)

  • Index Cond: ((data_transacao >= '2020-08-15 00:00:00'::timestamp without time zone) AND (data_transacao <= '2020-09-15 23:59:59'::timestamp without time zone))
  • Filter: (status_recebimento <> ALL ('{4,5,9,10}'::bigint[]))
  • Rows Removed by Filter: 2,197
8. 0.770 0.770 ↑ 1.0 1 10

Index Scan using idx_29022_primary on empresas empresa (cost=0.28..2.06 rows=1 width=56) (actual time=0.077..0.077 rows=1 loops=10)

  • Index Cond: ("Recebimento".empresa_id = id)
9. 0.070 0.070 ↑ 1.0 1 10

Index Scan using idx_29539_index_vendas_on_recebimento_id on vendas venda (cost=0.43..2.65 rows=1 width=20) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: ("Recebimento".id = recebimento_id)
10. 0.070 0.070 ↑ 1.0 1 10

Index Scan using idx_29174_primary on maquinetas maquineta (cost=0.28..2.06 rows=1 width=31) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: ("Recebimento".maquineta_id = id)
11. 0.050 0.050 ↑ 2.0 1 10

Index Scan using idx_29354_index_recebimento_parcelas_on_recebimento_id on recebimento_parcelas (cost=0.43..2.75 rows=2 width=24) (actual time=0.005..0.005 rows=1 loops=10)

  • Index Cond: ("Recebimento".id = recebimento_id)