explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lUIN

Settings
# exclusive inclusive rows x rows loops node
1. 0.728 292.843 ↑ 2.0 464 1

GroupAggregate (cost=18,438.44..18,542.46 rows=911 width=12) (actual time=291.982..292.843 rows=464 loops=1)

  • Group Key: trade_in_valuations.embed_configuration_id
2. 0.747 292.115 ↑ 6.1 2,080 1

Sort (cost=18,438.44..18,470.08 rows=12,655 width=8) (actual time=291.939..292.115 rows=2,080 loops=1)

  • Sort Key: trade_in_valuations.embed_configuration_id
  • Sort Method: quicksort Memory: 194kB
3. 0.609 291.368 ↑ 6.1 2,080 1

Hash Join (cost=1,871.18..17,576.16 rows=12,655 width=8) (actual time=286.269..291.368 rows=2,080 loops=1)

  • Hash Cond: (trade_in_valuations.embed_configuration_id = embed_configurations.id)
4. 277.642 277.642 ↑ 12.9 2,203 1

Index Scan using index_trade_in_valuations_on_completed_at on trade_in_valuations (cost=0.42..15,630.46 rows=28,477 width=8) (actual time=273.135..277.642 rows=2,203 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: 132,925
5. 0.195 13.117 ↓ 1.3 982 1

Hash (cost=1,861.62..1,861.62 rows=731 width=4) (actual time=13.116..13.117 rows=982 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 43kB
6. 11.426 12.922 ↓ 1.3 982 1

Bitmap Heap Scan on embed_configurations (cost=332.25..1,861.62 rows=731 width=4) (actual time=1.810..12.922 rows=982 loops=1)

  • Recheck Cond: ((((owner_type)::text = 'Customer'::text) AND (owner_id = ANY ('{1823,1686,1743,1868,1873,1872,1886,1778,1693,1704,1698,1715,1684,1884,1736,1567,1455,1738,1789,1534,1728,1697,1722,1741,1724,1772,1765,1812,1816,1696,1769,1742,1758,1691,803,1640,1882,1448,1450,1447,1451,1465,1319,1749,1468,1475,1477,1876,1327,1479,1481,1488,1489,1492,1495,1498,1818,1503,1509,1513,1514,1516,1390,1521,1643,144,1520,148,1530,1266,1540,1536,1860,1542,1552,1553,1555,1557,1558,1560,1374,1566,1574,1757,1568,1671,1483,1575,1578,1580,1825,1579,1867,1591,1587,1590,1592,1605,1595,1596,1597,1608,1610,1611,1618,1623,1632,1622,1624,1628,1634,1641,1637,1646,1650,1651,1652,1655,1862,1661,1673,1279,1669,1677,1678,1683,1687,1478,1699,1701,1705,1711,1713,1710,1717,1719,1320,1730,1716,1733,1859,1438,1439,1739,1744,1445,1799,1720,1826,1829,1885,1830,1506,1544,1667,1689,1386,1437,1706,1707,1418,1754,1753,1747,1771,1770,993,1777,1421,1469,1470,1471,1480,1524,1539,1586,1625,1688,1725,1735,1709,1734,1764,1811,1874,1831,1790,1805,1821,1822,1782,1755,1792,1268,1786,1392,1802,1820,1814,1793,1559,1370,8,1877,1323,1801,1803,1800,1328,1365,1368,1372,1837,1375,1401,1408,1507,1425}'::integer[]))) OR (((owner_type)::text = 'Department'::text) AND (owner_id = ANY ('{752,751,232,231,230,229,228,227,531,530,529,528,527,526,525,524,1643,1397,1398,1396,1395,1394,1393,1312,1311,962,961,960,959,1435,1434,1433,1432,1431,1430,1429,1428,1427,1426,1425,1424,163,162,161,119,118,117,116,115,114,111,107,106,105,104,103,102,101,99,98,97,96,94,91,90,89,88,87,85,84,83,82,81,80,79,78,76,75,74,1307,14,13,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,237,238,1684,236,1685,240,239,1310,1607,1606,1609,1608,1013,1012,1011,1010,1044,1046,1045,66,61,64,63,1043,60,65,62,125,124,121,70,69,68,67,1067,72,71,521,1677,1066,520,919,126,918,917,916,915,914,913,120,150,149,148,147,146,433,432,431,1014,272,271,270,269,268,267,266,275,274,273,179,178,204,203,202,200,465,207,206,205,392,391,390,341,340,339,338,337,336,226,225,224,223,222,311,310,309,308,307,306,305,304,303,302,301,300,299,298,297,296,295,329,320,318,325,324,323,1605,335,334,333,457,455,750,461,454,462,458,460,463,459,456,389,388,404,402,400,399,401,403,397,394,393,396,395,406,405,410,409,408,704,689,693,692,688,696,697,695,694,756,698,705,703,690,700,708,699,702,706,423,422,421,420,419,418,428,427,440,439,438,437,436,1166,1165,1164,1163,1162,1161,1160,1159,1158,1157,1156,1155,1154,1153,1152,1150,1149,1148,1147,1146,1145,1144,1143,1142,1141,1140,1139,1138,1137,1136,1135,1134,1133,1132,1131,1130,1129,1128,1127,1126,1125,1124,1123,1122,1121,1120,1119,1118,1117,1116,1115,1114,1113,1112,1111,1110,1109,1108,1107,1106,1105,1104,1103,1102,1101,1100,1099,1098,1097,1096,1095,1094,1093,1092,1091,1090,1089,1088,1087,1086,1084,532,449,448,447,446,445,444,443,442,452,451,488,595,483,490,480,478,477,593,596,594,592,489,487,486,485,484,482,481,479,476,475,493,492,491,503,504,512,511,510,509,508,507,519,518,517,516,515,514,523,522,584,583,582,604,602,1486,1485,1484,652,651,650,649,648,1076,1077,683,687,686,685,684,770,769,768,767,766,765,764,763,762,761,760,759,758,757,715,714,713,712,711,754,753,792,791,796,795,794,793,842,841,840,839,837,835,834,833,832,831,829,887,1237,890,889,888,886,885,884,883,882,881,880,879,878,894,893,892,1015,904,903,902,901,900,899,898,897,896,895,910,909,908,907,922,921,920,939,1642,958,957,956,955,954,953,952,951,950,949,948,947,946,945,944,943,942,941,1027,1026,1025,1024,1023,1022,1038,1037,1075,1074,1073,1072,1071,1070,1083,1082,1196,1195,1420,1419,1418,1417,1416,1415,1414,1413,1170,1169,1171,1172,1173,1168,1167,1184,1183,1182,1701,1700,1699,1698,1201,1200,1199,1198,1204,1203,1202,1209,1208,1207,1305,1303,1302,1300,1299,1298,1297,1291,1264,1265,1288,1284,1283,1280,1287,1282,1281,1293,1289,1295,1286,1274,1268,1269,1277,1276,1275,1273,1272,1270,1267,1271,1278,1294,1292,1290,1285,1279,1266,1335,1334,1333,1332,1331,1330,1329,1328,1327,1326,1325,1324,1323,1322,1321,1320,1319,1318,1317,1316,1315,1314,1313,1336,1231,1230,1229,1228,1236,1235,1234,1233,1232,1308,1309,1911,1374,1373,1372,1371,1370,1369,1368,1367,1366,1365,1364,1363,1362,1361,1360,1359,1358,1357,1356,1355,1354,1353,1338,1337,1345,1344,1343,1342,1341,1340,1339,1382,1381,1380,1379,1378,1377,1376,1349,1348,1347,1346,1351,1350,1412,1411,1453,1401,1400,1399,1452,1451,1450,1449,1448,1447,1461,1460,1470,1469,1468,1467,1466,1465,1464,1463,1462,1859,1858,1497,1496,1495,1494,1578,1604,1585,1584,1583,1582,1581,1580,1628,1623,1622,1621,1620,1619,1627,1626,1625,1624,1675,1661,1660,1681,1682,1680,1679,1678,1683,1694,1693,1692,1691,1690,1689,1688,1687,1686,1697,1696,1695,1704,1703,1702,1707,1706,1705,1738,1737,1805,1804,1803,1802,1801,1812,1811,1810,1809,1808,1807,1806,1845,1844,1843,1842,1846,1857,1856,1855,1854,1853,1852,1851,1850,1849,1867,1866,1865,1864,1863,1862,1861,1860,1900,1899,1883,1882,1881,1880,1879,1878,1877,1876,1875,1902,1901}'::integer[]))))
  • Filter: ((type)::text = 'EmbedConfigurations::TradeIn'::text)
  • Heap Blocks: exact=431
7. 0.000 1.496 ↓ 0.0 0 1

BitmapOr (cost=332.25..332.25 rows=807 width=0) (actual time=1.496..1.496 rows=0 loops=1)

8. 0.374 0.374 ↓ 2.2 447 1

Bitmap Index Scan on index_embed_configurations_on_owner_type_and_owner_id (cost=0.00..76.67 rows=206 width=0) (actual time=0.374..0.374 rows=447 loops=1)

  • Index Cond: (((owner_type)::text = 'Customer'::text) AND (owner_id = ANY ('{1823,1686,1743,1868,1873,1872,1886,1778,1693,1704,1698,1715,1684,1884,1736,1567,1455,1738,1789,1534,1728,1697,1722,1741,1724,1772,1765,1812,1816,1696,1769,1742,1758,1691,803,1640,1882,1448,1450,1447,1451,1465,1319,1749,1468,1475,1477,1876,1327,1479,1481,1488,1489,1492,1495,1498,1818,1503,1509,1513,1514,1516,1390,1521,1643,144,1520,148,1530,1266,1540,1536,1860,1542,1552,1553,1555,1557,1558,1560,1374,1566,1574,1757,1568,1671,1483,1575,1578,1580,1825,1579,1867,1591,1587,1590,1592,1605,1595,1596,1597,1608,1610,1611,1618,1623,1632,1622,1624,1628,1634,1641,1637,1646,1650,1651,1652,1655,1862,1661,1673,1279,1669,1677,1678,1683,1687,1478,1699,1701,1705,1711,1713,1710,1717,1719,1320,1730,1716,1733,1859,1438,1439,1739,1744,1445,1799,1720,1826,1829,1885,1830,1506,1544,1667,1689,1386,1437,1706,1707,1418,1754,1753,1747,1771,1770,993,1777,1421,1469,1470,1471,1480,1524,1539,1586,1625,1688,1725,1735,1709,1734,1764,1811,1874,1831,1790,1805,1821,1822,1782,1755,1792,1268,1786,1392,1802,1820,1814,1793,1559,1370,8,1877,1323,1801,1803,1800,1328,1365,1368,1372,1837,1375,1401,1408,1507,1425}'::integer[])))
9. 1.122 1.122 ↑ 1.1 535 1

Bitmap Index Scan on index_embed_configurations_on_owner_type_and_owner_id (cost=0.00..255.21 rows=600 width=0) (actual time=1.122..1.122 rows=535 loops=1)

  • Index Cond: (((owner_type)::text = 'Department'::text) AND (owner_id = ANY ('{752,751,232,231,230,229,228,227,531,530,529,528,527,526,525,524,1643,1397,1398,1396,1395,1394,1393,1312,1311,962,961,960,959,1435,1434,1433,1432,1431,1430,1429,1428,1427,1426,1425,1424,163,162,161,119,118,117,116,115,114,111,107,106,105,104,103,102,101,99,98,97,96,94,91,90,89,88,87,85,84,83,82,81,80,79,78,76,75,74,1307,14,13,578,577,576,575,574,573,572,571,570,569,568,567,566,565,564,563,562,561,560,559,558,557,556,555,554,553,552,551,550,549,548,547,546,545,544,543,542,541,540,237,238,1684,236,1685,240,239,1310,1607,1606,1609,1608,1013,1012,1011,1010,1044,1046,1045,66,61,64,63,1043,60,65,62,125,124,121,70,69,68,67,1067,72,71,521,1677,1066,520,919,126,918,917,916,915,914,913,120,150,149,148,147,146,433,432,431,1014,272,271,270,269,268,267,266,275,274,273,179,178,204,203,202,200,465,207,206,205,392,391,390,341,340,339,338,337,336,226,225,224,223,222,311,310,309,308,307,306,305,304,303,302,301,300,299,298,297,296,295,329,320,318,325,324,323,1605,335,334,333,457,455,750,461,454,462,458,460,463,459,456,389,388,404,402,400,399,401,403,397,394,393,396,395,406,405,410,409,408,704,689,693,692,688,696,697,695,694,756,698,705,703,690,700,708,699,702,706,423,422,421,420,419,418,428,427,440,439,438,437,436,1166,1165,1164,1163,1162,1161,1160,1159,1158,1157,1156,1155,1154,1153,1152,1150,1149,1148,1147,1146,1145,1144,1143,1142,1141,1140,1139,1138,1137,1136,1135,1134,1133,1132,1131,1130,1129,1128,1127,1126,1125,1124,1123,1122,1121,1120,1119,1118,1117,1116,1115,1114,1113,1112,1111,1110,1109,1108,1107,1106,1105,1104,1103,1102,1101,1100,1099,1098,1097,1096,1095,1094,1093,1092,1091,1090,1089,1088,1087,1086,1084,532,449,448,447,446,445,444,443,442,452,451,488,595,483,490,480,478,477,593,596,594,592,489,487,486,485,484,482,481,479,476,475,493,492,491,503,504,512,511,510,509,508,507,519,518,517,516,515,514,523,522,584,583,582,604,602,1486,1485,1484,652,651,650,649,648,1076,1077,683,687,686,685,684,770,769,768,767,766,765,764,763,762,761,760,759,758,757,715,714,713,712,711,754,753,792,791,796,795,794,793,842,841,840,839,837,835,834,833,832,831,829,887,1237,890,889,888,886,885,884,883,882,881,880,879,878,894,893,892,1015,904,903,902,901,900,899,898,897,896,895,910,909,908,907,922,921,920,939,1642,958,957,956,955,954,953,952,951,950,949,948,947,946,945,944,943,942,941,1027,1026,1025,1024,1023,1022,1038,1037,1075,1074,1073,1072,1071,1070,1083,1082,1196,1195,1420,1419,1418,1417,1416,1415,1414,1413,1170,1169,1171,1172,1173,1168,1167,1184,1183,1182,1701,1700,1699,1698,1201,1200,1199,1198,1204,1203,1202,1209,1208,1207,1305,1303,1302,1300,1299,1298,1297,1291,1264,1265,1288,1284,1283,1280,1287,1282,1281,1293,1289,1295,1286,1274,1268,1269,1277,1276,1275,1273,1272,1270,1267,1271,1278,1294,1292,1290,1285,1279,1266,1335,1334,1333,1332,1331,1330,1329,1328,1327,1326,1325,1324,1323,1322,1321,1320,1319,1318,1317,1316,1315,1314,1313,1336,1231,1230,1229,1228,1236,1235,1234,1233,1232,1308,1309,1911,1374,1373,1372,1371,1370,1369,1368,1367,1366,1365,1364,1363,1362,1361,1360,1359,1358,1357,1356,1355,1354,1353,1338,1337,1345,1344,1343,1342,1341,1340,1339,1382,1381,1380,1379,1378,1377,1376,1349,1348,1347,1346,1351,1350,1412,1411,1453,1401,1400,1399,1452,1451,1450,1449,1448,1447,1461,1460,1470,1469,1468,1467,1466,1465,1464,1463,1462,1859,1858,1497,1496,1495,1494,1578,1604,1585,1584,1583,1582,1581,1580,1628,1623,1622,1621,1620,1619,1627,1626,1625,1624,1675,1661,1660,1681,1682,1680,1679,1678,1683,1694,1693,1692,1691,1690,1689,1688,1687,1686,1697,1696,1695,1704,1703,1702,1707,1706,1705,1738,1737,1805,1804,1803,1802,1801,1812,1811,1810,1809,1808,1807,1806,1845,1844,1843,1842,1846,1857,1856,1855,1854,1853,1852,1851,1850,1849,1867,1866,1865,1864,1863,1862,1861,1860,1900,1899,1883,1882,1881,1880,1879,1878,1877,1876,1875,1902,1901}'::integer[])))
Planning time : 4.197 ms