explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q3cP

Settings
# exclusive inclusive rows x rows loops node
1. 2,164.934 73,788.477 ↓ 5.7 167,832 1

GroupAggregate (cost=368,154.52..404,285.53 rows=29,676 width=480) (actual time=71,397.172..73,788.477 rows=167,832 loops=1)

  • Group Key: fat_conducao.dia, fat_conducao.veiculo_id
2. 1,361.578 71,623.543 ↓ 1.8 521,398 1

Sort (cost=368,154.52..368,896.43 rows=296,764 width=271) (actual time=71,397.116..71,623.543 rows=521,398 loops=1)

  • Sort Key: fat_conducao.dia, fat_conducao.veiculo_id
  • Sort Method: external merge Disk: 125224kB
3. 0.000 70,261.965 ↓ 1.8 521,398 1

Gather (cost=1,000.00..287,565.22 rows=296,764 width=271) (actual time=9,222.687..70,261.965 rows=521,398 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 22.694 70,544.116 ↓ 1.4 173,799 3

Append (cost=0.00..256,888.82 rows=123,652 width=271) (actual time=9,205.777..70,544.116 rows=173,799 loops=3)

5. 0.001 0.001 ↓ 0.0 0 3

Parallel Seq Scan on fat_conducao (cost=0.00..0.00 rows=1 width=748) (actual time=0.001..0.001 rows=0 loops=3)

  • Filter: ((dia >= '2019-07-01'::date) AND (dia <= '2019-07-31'::date) AND (uo_veiculo_id = ANY ('{287,288,326,399,400,420,482,874,876,877,882,885,886,888,889,890,892,894,895,899,900,903,904,905,906,909,931,954,955,956,957,958,960,961,962,964,967,968,970,972,973,977,980,985,987,988,990,993,995,999,1000,1002,1006,1009,1011,1014,1021,1022,1023,1024,1028,1032,1037,1038,1039,1040,1043,1054,1055,1058,1059,1060,1063,1065,1066,1067,1069,1071,1078,1080,1085,1086,1087,1088,1090,1091,1092,1093,1096,1097,1098,1102,1110,1111,1120,1134,1135,1139,1188,1246,1268,1297,1298,1373,2296,2320,2349,2372,2376,2382,2393,2394,2435,2636,2637,2671,2790,2793,2794,2795,2809,2810,2813,2816,2830,2885,2892,2904,2961,2962,2970,3206,3395,3419,3449,3547,3560,3567,3575,3579,3599,3601,3603,3604,3608,3626,3720,3726,3741,3747,3756,3758,3794,3800,3802,3804,3848,3991,4175,4215,4259,4260,4261,4264,4305,4319,4324,4338,4350,4354,4358,4398,4405,4410,4772,5224,5225,5226,5227,5228,5229,5230,5231,5252,5312,5315}'::integer[])))
6. 61,316.267 70,521.421 ↓ 1.4 173,799 3

Parallel Bitmap Heap Scan on fat_conducao fat_conducao_1 (cost=9,964.55..256,888.82 rows=123,651 width=271) (actual time=9,205.775..70,521.421 rows=173,799 loops=3)

  • Recheck Cond: ((uo_veiculo_id = ANY ('{287,288,326,399,400,420,482,874,876,877,882,885,886,888,889,890,892,894,895,899,900,903,904,905,906,909,931,954,955,956,957,958,960,961,962,964,967,968,970,972,973,977,980,985,987,988,990,993,995,999,1000,1002,1006,1009,1011,1014,1021,1022,1023,1024,1028,1032,1037,1038,1039,1040,1043,1054,1055,1058,1059,1060,1063,1065,1066,1067,1069,1071,1078,1080,1085,1086,1087,1088,1090,1091,1092,1093,1096,1097,1098,1102,1110,1111,1120,1134,1135,1139,1188,1246,1268,1297,1298,1373,2296,2320,2349,2372,2376,2382,2393,2394,2435,2636,2637,2671,2790,2793,2794,2795,2809,2810,2813,2816,2830,2885,2892,2904,2961,2962,2970,3206,3395,3419,3449,3547,3560,3567,3575,3579,3599,3601,3603,3604,3608,3626,3720,3726,3741,3747,3756,3758,3794,3800,3802,3804,3848,3991,4175,4215,4259,4260,4261,4264,4305,4319,4324,4338,4350,4354,4358,4398,4405,4410,4772,5224,5225,5226,5227,5228,5229,5230,5231,5252,5312,5315}'::integer[])) AND (dia >= '2019-07-01'::date) AND (dia <= '2019-07-31'::date))
  • Rows Removed by Index Recheck: 274011
  • Heap Blocks: exact=12731 lossy=21252
7. 9,205.154 9,205.154 ↓ 1.9 564,924 1

Bitmap Index Scan on idx_2019_07_fat_conducao_uo_vei_dia (cost=0.00..9,890.35 rows=296,763 width=0) (actual time=9,205.154..9,205.154 rows=564,924 loops=1)

  • Index Cond: ((uo_veiculo_id = ANY ('{287,288,326,399,400,420,482,874,876,877,882,885,886,888,889,890,892,894,895,899,900,903,904,905,906,909,931,954,955,956,957,958,960,961,962,964,967,968,970,972,973,977,980,985,987,988,990,993,995,999,1000,1002,1006,1009,1011,1014,1021,1022,1023,1024,1028,1032,1037,1038,1039,1040,1043,1054,1055,1058,1059,1060,1063,1065,1066,1067,1069,1071,1078,1080,1085,1086,1087,1088,1090,1091,1092,1093,1096,1097,1098,1102,1110,1111,1120,1134,1135,1139,1188,1246,1268,1297,1298,1373,2296,2320,2349,2372,2376,2382,2393,2394,2435,2636,2637,2671,2790,2793,2794,2795,2809,2810,2813,2816,2830,2885,2892,2904,2961,2962,2970,3206,3395,3419,3449,3547,3560,3567,3575,3579,3599,3601,3603,3604,3608,3626,3720,3726,3741,3747,3756,3758,3794,3800,3802,3804,3848,3991,4175,4215,4259,4260,4261,4264,4305,4319,4324,4338,4350,4354,4358,4398,4405,4410,4772,5224,5225,5226,5227,5228,5229,5230,5231,5252,5312,5315}'::integer[])) AND (dia >= '2019-07-01'::date) AND (dia <= '2019-07-31'::date))
Planning time : 5.950 ms
Execution time : 73,867.190 ms