explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t6w9

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 36,559.759 ↑ 1.0 1 1

Limit (cost=17.48..17.49 rows=1 width=138) (actual time=36,559.759..36,559.759 rows=1 loops=1)

2. 53.209 36,559.757 ↑ 1.0 1 1

Sort (cost=17.48..17.49 rows=1 width=138) (actual time=36,559.757..36,559.757 rows=1 loops=1)

  • Sort Key: tax0_."createdAt" DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 27.115 36,506.548 ↓ 37,772.0 37,772 1

Nested Loop Left Join (cost=3.16..17.47 rows=1 width=138) (actual time=1.339..36,506.548 rows=37,772 loops=1)

4. 21.821 28,056.277 ↓ 37,772.0 37,772 1

Nested Loop Left Join (cost=2.72..15.14 rows=1 width=140) (actual time=1.334..28,056.277 rows=37,772 loops=1)

5. 20.187 19,800.160 ↓ 37,772.0 37,772 1

Nested Loop Left Join (cost=2.29..12.80 rows=1 width=144) (actual time=1.328..19,800.160 rows=37,772 loops=1)

6. 29.663 11,507.905 ↓ 37,772.0 37,772 1

Nested Loop (cost=1.86..10.47 rows=1 width=148) (actual time=1.323..11,507.905 rows=37,772 loops=1)

7. 10.054 6,190.162 ↓ 37,772.0 37,772 1

Nested Loop (cost=1.29..7.97 rows=1 width=127) (actual time=1.305..6,190.162 rows=37,772 loops=1)

8. 0.452 0.452 ↑ 1.0 1 1

Index Scan using idx_rec_integrationid on recipients recipient2_ (cost=0.43..2.65 rows=1 width=26) (actual time=0.451..0.452 rows=1 loops=1)

  • Index Cond: ("integrationId" = 79,654,257)
9. 19.229 6,179.656 ↓ 37,772.0 37,772 1

Nested Loop (cost=0.86..5.31 rows=1 width=109) (actual time=0.851..6,179.656 rows=37,772 loops=1)

10. 0.009 0.009 ↑ 1.0 1 1

Index Scan using idx_integrationid on issuers issuer1_ (cost=0.29..2.51 rows=1 width=26) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: ("integrationId" = 1,454,184)
11. 6,160.418 6,160.418 ↓ 37,772.0 37,772 1

Index Scan using "taxes_issuerId_recipientId_icmsId_ncm_goal_operationType_idx" on taxes tax0_ (cost=0.57..2.79 rows=1 width=91) (actual time=0.839..6,160.418 rows=37,772 loops=1)

  • Index Cond: (("issuerId" = issuer1_.id) AND ("recipientId" = recipient2_.id) AND ((ncm)::text = '19059090'::text) AND ((goal)::text = 'NORMAL'::text) AND (("operationType")::text = 'OUT'::text))
12. 5,288.080 5,288.080 ↑ 1.0 1 37,772

Index Scan using icms_pkey on icms icms3_ (cost=0.57..2.50 rows=1 width=29) (actual time=0.140..0.140 rows=1 loops=37,772)

  • Index Cond: (id = tax0_."icmsId")
13. 8,272.068 8,272.068 ↑ 1.0 1 37,772

Index Scan using pis_pkey on pis pis4_ (cost=0.43..2.33 rows=1 width=28) (actual time=0.219..0.219 rows=1 loops=37,772)

  • Index Cond: (tax0_.pisid = id)
14. 8,234.296 8,234.296 ↑ 1.0 1 37,772

Index Scan using cofins_pkey on cofins cofins5_ (cost=0.43..2.33 rows=1 width=28) (actual time=0.218..0.218 rows=1 loops=37,772)

  • Index Cond: (tax0_.cofinsid = id)
15. 8,423.156 8,423.156 ↑ 1.0 1 37,772

Index Scan using ipi_pkey on ipi ipi6_ (cost=0.43..2.33 rows=1 width=30) (actual time=0.223..0.223 rows=1 loops=37,772)

  • Index Cond: (tax0_.ipiid = id)
Planning time : 5.591 ms
Execution time : 36,559.945 ms