explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YGs6

Settings
# exclusive inclusive rows x rows loops node
1. 0.179 22.400 ↑ 1.0 419 1

Hash Left Join (cost=1,553.93..7,388.22 rows=419 width=2,745) (actual time=17.555..22.400 rows=419 loops=1)

  • Hash Cond: ("Coleta".fk_tipo_veiculo = "TipoVeiculo".codigo)
2. 0.201 22.214 ↑ 1.0 419 1

Hash Left Join (cost=1,552.70..7,385.42 rows=419 width=2,738) (actual time=17.540..22.214 rows=419 loops=1)

  • Hash Cond: (("Coleta".fk_estado_coleta)::text = ("EstadoColetar".sigla)::text)
3. 0.178 22.003 ↑ 1.0 419 1

Hash Left Join (cost=1,551.09..7,382.54 rows=419 width=1,709) (actual time=17.517..22.003 rows=419 loops=1)

  • Hash Cond: ("Coleta".fk_tipo_coleta = "TipoColeta".codigo)
4. 0.145 21.820 ↑ 1.0 419 1

Hash Left Join (cost=1,550.05..7,378.06 rows=419 width=1,701) (actual time=17.504..21.820 rows=419 loops=1)

  • Hash Cond: ("DoctoDigitalizados".fk_tipo_documento = "DoctoDigitalizados.TipoDocumentoDigital".codigo)
5. 0.218 21.646 ↑ 1.0 419 1

Hash Left Join (cost=1,546.02..7,372.88 rows=419 width=1,670) (actual time=17.464..21.646 rows=419 loops=1)

  • Hash Cond: ("Remessa".fk_estado = ("Remessa.Estado".sigla)::bpchar)
6. 0.170 21.418 ↑ 1.0 419 1

Hash Left Join (cost=1,544.42..7,365.51 rows=419 width=641) (actual time=17.429..21.418 rows=419 loops=1)

  • Hash Cond: ("Remessa".fk_courier_coleta = "Remessa.CourierColeta".codigo)
7. 0.173 21.193 ↑ 1.0 419 1

Hash Left Join (cost=1,530.66..7,350.65 rows=419 width=634) (actual time=17.367..21.193 rows=419 loops=1)

  • Hash Cond: ("Remessa".fk_courier_destino = "Remessa.CourierDestino".codigo)
8. 0.119 20.944 ↑ 1.0 419 1

Nested Loop Left Join (cost=1,516.90..7,335.77 rows=419 width=627) (actual time=17.282..20.944 rows=419 loops=1)

9. 0.368 20.406 ↑ 1.0 419 1

Nested Loop (cost=1,516.75..7,267.71 rows=419 width=607) (actual time=17.271..20.406 rows=419 loops=1)

10. 0.140 17.524 ↑ 1.0 419 1

Hash Left Join (cost=1,516.19..3,673.74 rows=419 width=368) (actual time=17.236..17.524 rows=419 loops=1)

  • Hash Cond: ("Coleta"."TipoDocumentoCodigo" = "TipoDocumento".codigo)
11. 7.309 17.372 ↑ 1.0 419 1

Hash Right Join (cost=1,514.94..3,670.97 rows=419 width=355) (actual time=17.207..17.372 rows=419 loops=1)

  • Hash Cond: ("DoctoDigitalizados".fk_coleta = "Coleta".codigo)
12. 6.857 6.857 ↑ 1.0 76,992 1

Seq Scan on "DoctoDigitalizado" "DoctoDigitalizados" (cost=0.00..1,953.92 rows=76,992 width=84) (actual time=0.008..6.857 rows=76,992 loops=1)

13. 0.330 3.206 ↑ 1.0 419 1

Hash (cost=1,509.71..1,509.71 rows=419 width=275) (actual time=3.206..3.206 rows=419 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 123kB
14. 2.876 2.876 ↑ 1.0 419 1

Index Scan using "Coleta_fk_remessa_idx" on "Coleta" (cost=0.42..1,509.71 rows=419 width=275) (actual time=0.734..2.876 rows=419 loops=1)

  • Index Cond: ((fk_remessa)::text = ANY ('{IC190892,IC190891,IC190893,IC190894,IC190895,IC190896,IC190897,IC190899,IC190898,IC1908100,IC1908101,IC1908102,IC1908103,IC1908104,IC1908105,IC1908106,IC1908107,IC1908108,IC1908109,IC1908111,IC1908112,IC1908113,IC1908114,IC1908115,IC1908116,IC1908117,IC1908118,IC1908119,IC1908120,IC1908121,IC1908122,IC1908123,IC1908124,IC1908125,IC1908126,IC1908127,IC1908128,IC1908129,IC1908130,IC1908131,IC1908132,IC1908133,IC1908134,IC1908135,IC1908136,IC1908137,IC1908138,IC1908139,IC1908140,IC1908141,IC1908142,IC1908143,IC1908144,IC1908145,IC1908146,IC1908147,IC1908148,IC1908149,IC1908150,IC1908151,IC1908152,IC1908153,IC1908154,IC1908155,IC1908156,IC1908157,IC1908158,IC1908159,IC1908160,IC1908161,IC1908162,IC1908163,IC1908164,IC1908165,IC1908166,IC1908167,IC1908168,IC1908169,IC1908170,IC1908171,IC1908172,IC1908173,IC1908174,IC1908175,IC1908176,IC1908177,IC1908178,IC1908179,IC1908180,IC1908181,IC1908182,IC1908183,IC1908184,IC1908185,IC1908186,IC1908187,IC1908188,IC1908190,IC1908189,IC1908191,IC1908192,IC1908193,IC1908195,IC1908194,IC1908196,IC1908197,IC1908198,IC1908199,IC1908201,IC1908200,IC1908202,IC1908203,IC1908204,IC1908205,IC1908206,IC1908207,IC1908208,IC1908209,IC1908210,IC1908211,IC1908212,IC1908213,IC1908214,IC1908215,IC1908216,IC1908217,IC1908218,IC1908219,IC1908220,IC1908221,IC1908222,IC1908223,IC1908224,IC1908225,IC1908226,IC1908227,IC1908229,IC1908228,IC1908230,IC1908232,IC1908231,IC1908233,IC1908234,IC1908235,IC1908236,IC1908237,IC1908238,IC1908239,IC1908240,IC1908241,IC1908242,IC1908244,IC1908245,IC1908246,IC1908247,IC1908248,IC1908249,IC1908250,IC1908251,IC1908252,IC1908253,IC1908254,IC1908255,IC1908256,IC1908257,IC1908258,IC1908259,IC1908260,IC1908261,IC1908262,IC1908263,IC1908264,IC1908265,IC1908266,IC1908267,IC1908268,IC1908269,IC1908270,IC1908271,IC1908272,IC1908275,IC1908273,IC1908274,IC1908276,IC1908278,IC1908277,IC1908279,IC1908280,IC1908281,IC1908282,IC1908283,IC1908284,IC1908285,IC1908286,IC1908287,IC1908288,IC1908290,IC1908291,IC1908292,IC1908293,IC1908294,IC1908296,IC1908297,IC1908298,IC1908299,IC1908301,IC1908300,IC1908302,IC1908303,IC1908304,IC1908305,IC1908306,IC1908307,IC1908308,IC1908309,IC1908310,IC1908311,IC1908312,IC1908313,IC1908314,IC1908315,IC1908316,IC1908317,IC1908318,IC1908319,IC1908321,IC1908322,IC1908323,IC1908324,IC1908325,IC1908327,IC1908328,IC1908330,IC1908329,IC1908331,IC1908332,IC1908333,IC1908334,IC1908335,IC1908337,IC1908336,IC1908338,IC1908339,IC1908340,IC1908341,IC1908342,IC1908343,IC1908344,IC1908345,IC1908346,IC1908347,IC1908348,IC1908349,IC1908350,IC1908351,IC1908352,IC1908404,IC1908353,IC1908405,IC1908354,IC1908406,IC1908355,IC1908407,IC1908356,IC1908408,IC1908357,IC1908409,IC1908411,IC1908410,IC1908358,IC1908412,IC1908359,IC1908413,IC1908416,IC1908414,IC1908360,IC1908415,IC1908417,IC1908361,IC1908418,IC1908419,IC1908362,IC1908420,IC1908421,IC1908422,IC1908363,IC1908425,IC1908364,IC1908423,IC1908365,IC1908424,IC1908426,IC1908366,IC1908427,IC1908369,IC1908428,IC1908367,IC1908429,IC1908368,IC1908430,IC1908370,IC1908431,IC1908371,IC1908432,IC1908372,IC1908433,IC1908434,IC1908374,IC1908435,IC1908373,IC1908436,IC1908437,IC1908375,IC1908376,IC1908438,IC1908377,IC1908439,IC1908440,IC1908378,IC1908441,IC1908379,IC1908442,IC1908380,IC1908443,IC1908381,IC1908444,IC1908382,IC1908445,IC1908383,IC1908446,IC1908384,IC1908447,IC1908385,IC1908448,IC1908449,IC1908386,IC1908450,IC1908387,IC1908451,IC1908388,IC1908452,IC1908389,IC1908453,IC1908390,IC1908454,IC1908391,IC1908456,IC1908392,IC1908455,IC1908457,IC1908393,IC1908394,IC1908458,IC1908395,IC1908459,IC1908396,IC1908460,IC1908397,IC1908461,IC1908398,IC1908462,IC1908463,IC1908399,IC1908464,IC1908465,IC1908400,IC1908466,IC1908401,IC1908467,IC1908402,IC1908468,IC1908403,IC1908469,IC1908470,IC1908471,IC1908472,IC1908473,IC1908474,IC1908475,IC1908476,IC1908477,IC1908478,IC1908479,IC1908480,IC1908481,IC1908482,IC1908483,IC1908484,IC1908485,IC1908486,IC1908487,IC1908488,IC1908489,IC1908490,IC1908491,IC1908492,IC1908493,IC1908494,IC1908495,IC1908496,IC1908497,IC1908498,IC1908499,IC1908500,IC1908501,IC1908502,IC1908503,IC1908504,IC1908505,IC1908506,IC1908507,IC1908509,IC1908510,IC1908508,IC1908513,IC1908512,IC1908511,IC1908514,IC1908515}'::text[]))
15. 0.004 0.012 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=17) (actual time=0.012..0.012 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.008 0.008 ↑ 1.0 11 1

Seq Scan on "TipoDocumento" (cost=0.00..1.11 rows=11 width=17) (actual time=0.007..0.008 rows=11 loops=1)

17. 2.514 2.514 ↑ 1.0 1 419

Index Scan using "Remessa_pkey" on "Remessa" (cost=0.56..8.58 rows=1 width=251) (actual time=0.006..0.006 rows=1 loops=419)

  • Index Cond: ((codigo)::text = ("Coleta".fk_remessa)::text)
18. 0.419 0.419 ↑ 1.0 1 419

Index Scan using "Servico_pkey" on "Servico" "Remessa.Servico" (cost=0.14..0.16 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=419)

  • Index Cond: ("Remessa".fk_servico = codigo)
19. 0.035 0.076 ↑ 1.0 256 1

Hash (cost=10.56..10.56 rows=256 width=11) (actual time=0.076..0.076 rows=256 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
20. 0.041 0.041 ↑ 1.0 256 1

Seq Scan on "Courier" "Remessa.CourierDestino" (cost=0.00..10.56 rows=256 width=11) (actual time=0.007..0.041 rows=256 loops=1)

21. 0.029 0.055 ↑ 1.0 256 1

Hash (cost=10.56..10.56 rows=256 width=11) (actual time=0.055..0.055 rows=256 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
22. 0.026 0.026 ↑ 1.0 256 1

Seq Scan on "Courier" "Remessa.CourierColeta" (cost=0.00..10.56 rows=256 width=11) (actual time=0.002..0.026 rows=256 loops=1)

23. 0.005 0.010 ↑ 1.0 27 1

Hash (cost=1.27..1.27 rows=27 width=1,032) (actual time=0.010..0.010 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
24. 0.005 0.005 ↑ 1.0 27 1

Seq Scan on "Estado" "Remessa.Estado" (cost=0.00..1.27 rows=27 width=1,032) (actual time=0.003..0.005 rows=27 loops=1)

25. 0.012 0.029 ↑ 1.0 90 1

Hash (cost=2.90..2.90 rows=90 width=35) (actual time=0.029..0.029 rows=90 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
26. 0.017 0.017 ↑ 1.0 90 1

Seq Scan on "TipoDocumentoDigital" "DoctoDigitalizados.TipoDocumentoDigital" (cost=0.00..2.90 rows=90 width=35) (actual time=0.008..0.017 rows=90 loops=1)

27. 0.002 0.005 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=12) (actual time=0.005..0.005 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on "TipoColeta" (cost=0.00..1.02 rows=2 width=12) (actual time=0.002..0.003 rows=2 loops=1)

29. 0.006 0.010 ↑ 1.0 27 1

Hash (cost=1.27..1.27 rows=27 width=1,032) (actual time=0.010..0.010 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
30. 0.004 0.004 ↑ 1.0 27 1

Seq Scan on "Estado" "EstadoColetar" (cost=0.00..1.27 rows=27 width=1,032) (actual time=0.002..0.004 rows=27 loops=1)

31. 0.004 0.007 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=11) (actual time=0.007..0.007 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.003 0.003 ↑ 1.0 10 1

Seq Scan on "TipoVeiculo" (cost=0.00..1.10 rows=10 width=11) (actual time=0.003..0.003 rows=10 loops=1)

Planning time : 5.461 ms