explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rbj3

Settings
# exclusive inclusive rows x rows loops node
1. 1.173 1,687.424 ↑ 2.1 421 1

GroupAggregate (cost=93,953.83..94,154.29 rows=879 width=12) (actual time=1,685.939..1,687.424 rows=421 loops=1)

  • Group Key: trade_in_valuations.embed_configuration_id
2. 1.215 1,686.251 ↑ 8.5 3,010 1

Sort (cost=93,953.83..94,017.72 rows=25,556 width=8) (actual time=1,685.920..1,686.251 rows=3,010 loops=1)

  • Sort Key: trade_in_valuations.embed_configuration_id
  • Sort Method: quicksort Memory: 238kB
3. 0.959 1,685.036 ↑ 8.5 3,010 1

Hash Join (cost=722.90..92,082.95 rows=25,556 width=8) (actual time=1,673.091..1,685.036 rows=3,010 loops=1)

  • Hash Cond: (trade_in_valuations.embed_configuration_id = embed_configurations.id)
4. 1,681.945 1,681.945 ↑ 27.7 3,039 1

Index Scan using index_trade_in_valuations_on_completed_at on trade_in_valuations (cost=0.42..91,138.51 rows=84,257 width=8) (actual time=1,670.942..1,681.945 rows=3,039 loops=1)

  • Filter: ((buyer_car_estimation_id IS NOT NULL) AND ((email_verification_required IS NOT TRUE) OR ((email_verification_required IS TRUE) AND (email_verification_confirmed IS TRUE))) AND (is_test_lead IS NOT TRUE) AND ((COALESCE(completed_at, created_at))::date >= '2020-09-01'::date))
  • Rows Removed by Filter: 252,252
5. 0.081 2.132 ↓ 1.8 643 1

Hash (cost=718.02..718.02 rows=357 width=4) (actual time=2.132..2.132 rows=643 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 31kB
6. 1.105 2.051 ↓ 1.8 643 1

Bitmap Heap Scan on embed_configurations (cost=208.20..718.02 rows=357 width=4) (actual time=0.973..2.051 rows=643 loops=1)

  • Recheck Cond: ((((owner_type)::text = 'Customer'::text) AND (owner_id = ANY ('{776,1265,1076,1162,1415,1416,1351,1213,990,1005,1324,1115,1053,1365,777,1366,88,1361,1359,1364,1362,1417,1379,1071,1287,24,938,1375,1410,1335,1419,1418,1367,104,805,1277,1099,1139,1424,1078,1429,1422,914,16,1378,1006,1370,511,796,1311,998,1040,1063,884,1070,513,1082,1085,1087,883,1102,1100,1116,1110,975,1405,1126,1135,1134,1122,996,1143,1136,936,1157,1158,1160,1173,7,1177,1411,1189,43,4,1105,12,92,70,54,1199,79,139,56,1172,1431,1223,1221,1432,86,1423,149,1299,1227,113,1224,1233,1239,1236,1240,1247,99,102,108,1249,1255,1261,1262,1257,1263,1276,1282,1274,1275,1285,1289,1298,1291,885,1304,1301,1308,1300,1310,1321,1313,1319,1312,940,1329,1327,1328,1325,120,1336,1337,1333,1332,1342,1339,477,1343,1348,1344,982,846,1352,1354,1356,909,1373,1371,946,1385,1383,1394,1396,1393,979,981,1024,1055,959,1114,1140,1195,1196,1193,1073,1061,965,966,925,449,225,698,886,903,899,1011,1027,1028,1113,1117,1132,1145,1185,1190,1207,1232,1235,1230,1242,1244,1254,1258,1280,77,78,1406,1391,1407,1398,529,1142,134,410,792,1264,1408,845,889,892,34,910,1399,890,1409,1428,888,951,35,1044,947,1,955,19,15,1430,932,843,1427,701,1404,943,986,2,1426,1412,1420,1016,1421,1012,28,1022,800,1018,789,1283,997}'::integer[]))) OR (((owner_type)::text = 'Department'::text) AND (owner_id = ANY ('{52,51,14,13,12,11,10,9,8,7,6,5,4,3,2,1,119,53,16,15,274,95,94,93,92,569,568,65,64,63,62,68,60,59,66,67,56,55,58,35,136,135,134,133,108,107,106,105,562,36,37,38,45,44,43,42,41,40,39,596,558,559,440,70,71,69,72,285,91,90,590,588,591,589,648,685,643,167,151,183,182,181,179,282,180,176,178,177,175,174,173,172,288,170,169,168,165,287,166,163,162,164,160,161,159,158,157,156,155,154,152,150,149,148,147,286,146,145,144,143,141,140,138,281,186,184,171,185,118,117,116,115,114,283,284,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,264,263,267,265,266,279,278,290,289,344,318,317,316,315,314,313,312,311,310,308,307,309,335,334,690,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,439,345,348,346,347,406,405,409,404,408,403,402,400,399,401,398,397,396,395,394,393,391,389,390,387,351,386,385,381,383,384,373,380,379,372,371,369,368,367,366,365,377,364,363,362,361,360,359,358,357,356,355,354,353,375,378,352,350,349,407,392,388,382,376,374,370,549,548,547,546,544,539,537,534,527,523,521,520,517,514,509,550,545,543,542,541,540,538,536,535,533,532,531,530,529,528,526,525,524,522,519,518,516,515,513,512,511,510,508,507,506,505,504,503,502,501,500,499,498,497,496,495,449,561,560,686,580,581,594,595,593,606,615,613,611,609,616,612,617,614,610,608,607,624,623,622,621,620,619,618,642,641,689,644,647,646,645,652,653,654,651}'::integer[]))))
  • Filter: ((type)::text = 'EmbedConfigurations::TradeIn'::text)
  • Heap Blocks: exact=147
7. 0.001 0.946 ↓ 0.0 0 1

BitmapOr (cost=208.20..208.20 rows=389 width=0) (actual time=0.946..0.946 rows=0 loops=1)

8. 0.417 0.417 ↓ 1.6 304 1

Bitmap Index Scan on index_embed_configurations_on_owner_type_and_owner_id (cost=0.00..84.46 rows=192 width=0) (actual time=0.417..0.417 rows=304 loops=1)

  • Index Cond: (((owner_type)::text = 'Customer'::text) AND (owner_id = ANY ('{776,1265,1076,1162,1415,1416,1351,1213,990,1005,1324,1115,1053,1365,777,1366,88,1361,1359,1364,1362,1417,1379,1071,1287,24,938,1375,1410,1335,1419,1418,1367,104,805,1277,1099,1139,1424,1078,1429,1422,914,16,1378,1006,1370,511,796,1311,998,1040,1063,884,1070,513,1082,1085,1087,883,1102,1100,1116,1110,975,1405,1126,1135,1134,1122,996,1143,1136,936,1157,1158,1160,1173,7,1177,1411,1189,43,4,1105,12,92,70,54,1199,79,139,56,1172,1431,1223,1221,1432,86,1423,149,1299,1227,113,1224,1233,1239,1236,1240,1247,99,102,108,1249,1255,1261,1262,1257,1263,1276,1282,1274,1275,1285,1289,1298,1291,885,1304,1301,1308,1300,1310,1321,1313,1319,1312,940,1329,1327,1328,1325,120,1336,1337,1333,1332,1342,1339,477,1343,1348,1344,982,846,1352,1354,1356,909,1373,1371,946,1385,1383,1394,1396,1393,979,981,1024,1055,959,1114,1140,1195,1196,1193,1073,1061,965,966,925,449,225,698,886,903,899,1011,1027,1028,1113,1117,1132,1145,1185,1190,1207,1232,1235,1230,1242,1244,1254,1258,1280,77,78,1406,1391,1407,1398,529,1142,134,410,792,1264,1408,845,889,892,34,910,1399,890,1409,1428,888,951,35,1044,947,1,955,19,15,1430,932,843,1427,701,1404,943,986,2,1426,1412,1420,1016,1421,1012,28,1022,800,1018,789,1283,997}'::integer[])))
9. 0.528 0.528 ↓ 1.7 339 1

Bitmap Index Scan on index_embed_configurations_on_owner_type_and_owner_id (cost=0.00..123.56 rows=198 width=0) (actual time=0.528..0.528 rows=339 loops=1)

  • Index Cond: (((owner_type)::text = 'Department'::text) AND (owner_id = ANY ('{52,51,14,13,12,11,10,9,8,7,6,5,4,3,2,1,119,53,16,15,274,95,94,93,92,569,568,65,64,63,62,68,60,59,66,67,56,55,58,35,136,135,134,133,108,107,106,105,562,36,37,38,45,44,43,42,41,40,39,596,558,559,440,70,71,69,72,285,91,90,590,588,591,589,648,685,643,167,151,183,182,181,179,282,180,176,178,177,175,174,173,172,288,170,169,168,165,287,166,163,162,164,160,161,159,158,157,156,155,154,152,150,149,148,147,286,146,145,144,143,141,140,138,281,186,184,171,185,118,117,116,115,114,283,284,684,683,682,681,680,679,678,677,676,675,674,673,672,671,670,669,668,667,666,665,664,663,662,661,660,659,658,657,656,655,264,263,267,265,266,279,278,290,289,344,318,317,316,315,314,313,312,311,310,308,307,309,335,334,690,494,493,492,491,490,489,488,487,486,485,484,483,482,481,480,479,478,477,476,475,474,473,472,471,470,469,468,467,466,465,464,463,462,461,460,459,458,457,456,455,454,453,452,451,439,345,348,346,347,406,405,409,404,408,403,402,400,399,401,398,397,396,395,394,393,391,389,390,387,351,386,385,381,383,384,373,380,379,372,371,369,368,367,366,365,377,364,363,362,361,360,359,358,357,356,355,354,353,375,378,352,350,349,407,392,388,382,376,374,370,549,548,547,546,544,539,537,534,527,523,521,520,517,514,509,550,545,543,542,541,540,538,536,535,533,532,531,530,529,528,526,525,524,522,519,518,516,515,513,512,511,510,508,507,506,505,504,503,502,501,500,499,498,497,496,495,449,561,560,686,580,581,594,595,593,606,615,613,611,609,616,612,617,614,610,608,607,624,623,622,621,620,619,618,642,641,689,644,647,646,645,652,653,654,651}'::integer[])))
Planning time : 2.684 ms