-- an IN list of 1000 ids through a point directory of exact size (ceil(keys * 4 / 3) slots, column format minor 33): 2.5 slots a hit instead of 1.5, the same blocks, the index 10 bytes a row smaller than at a power of two -- label: `SELECT id, amount, title WHERE id IN (<1000 ids>)`, no btree on `id`, `point_tid_columns = 'id'` -- ordered: yes -- set: sift.enable_col_scan = on --@ setup ALTER TABLE orders DROP CONSTRAINT orders_pkey; DROP INDEX orders_col; CREATE INDEX orders_col ON orders USING sift_col (id sift.col_int4_ops, customer_id sift.col_int4_ops, amount sift.col_numeric_ops) WITH (point_tid_columns = 'id') --@ pg SELECT id, customer_id, amount, title FROM orders WHERE id IN (410,1315,2616,3521,4822,5727,7028,7933,8329,9234,10535,11440,12741,13646,14947,15852,16248,17153,18454,19359,20660,21565,22866,23771,24167,25072,26373,27278,28579,29484,30785,31690,32086,32991,34292,35197,36498,37403,38704,39609,40005,40910,42211,43116,44417,45322,46623,47528,47924,48829,50130,51035,52336,53241,54542,55447,55843,56748,58049,58954,60255,61160,62461,63366,63762,64667,65968,66873,68174,69079,70380,71285,71681,72586,73887,74792,76093,76998,78299,79204,79600,80505,81806,82711,84012,84917,86218,87123,87519,88424,89725,90630,91931,92836,94137,95042,95438,96343,97644,98549,99850,100755,102056,102961,103357,104262,105563,106468,107769,108674,109975,110880,111276,112181,113482,114387,115688,116593,117894,118799,119195,120100,121401,122306,123607,124512,125813,126718,127114,128019,129320,130225,131526,132431,133732,134637,135033,135938,137239,138144,139445,140350,141651,142556,142952,143857,145158,146063,147364,148269,149570,150475,150871,151776,153077,153982,155283,156188,157489,158394,158790,159695,160996,161901,163202,164107,165408,166313,166709,167614,168915,169820,171121,172026,173327,174232,174628,175533,176834,177739,179040,179945,181246,182151,182547,183452,184753,185658,186959,187864,189165,190070,190466,191371,192672,193577,194878,195783,197084,197989,198385,199290,200591,201496,202797,203702,205003,205908,206304,207209,208510,209415,210716,211621,212922,213827,214223,215128,216429,217334,218635,219540,220841,221746,222142,223047,224348,225253,226554,227459,228760,229665,230061,230966,232267,233172,234473,235378,236679,237584,237980,238885,240186,241091,242392,243297,244598,245503,245899,246804,248105,249010,250311,251216,252517,253422,253818,254723,256024,256929,258230,259135,260436,261341,261737,262642,263943,264848,266149,267054,268355,269260,269656,270561,271862,272767,274068,274973,276274,277179,277575,278480,279781,280686,281987,282892,284193,285098,285494,286399,287700,288605,289906,290811,292112,293017,293413,294318,295619,296524,297825,298730,300031,300936,301332,302237,303538,304443,305744,306649,307950,308855,309251,310156,311457,312362,313663,314568,315869,316774,317170,318075,319376,320281,321582,322487,323788,324693,325089,325994,327295,328200,329501,330406,331707,332612,333008,333913,335214,336119,337420,338325,339626,340531,340927,341832,343133,344038,345339,346244,347545,348450,348846,349751,351052,351957,353258,354163,355464,356369,356765,357670,358971,359876,361177,362082,363383,364288,364684,365589,366890,367795,369096,370001,371302,372207,372603,373508,374809,375714,377015,377920,379221,380126,380522,381427,382728,383633,384934,385839,387140,388045,388441,389346,390647,391552,392853,393758,395059,395964,396360,397265,398566,399471,400772,401677,402978,403883,404279,405184,406485,407390,408691,409596,410897,411802,412198,413103,414404,415309,416610,417515,418816,419721,420117,421022,422323,423228,424529,425434,426735,427640,428036,428941,430242,431147,432448,433353,434654,435559,435955,436860,438161,439066,440367,441272,442573,443478,443874,444779,446080,446985,448286,449191,450492,451397,451793,452698,453999,454904,456205,457110,458411,459316,459712,460617,461918,462823,464124,465029,466330,467235,467631,468536,469837,470742,472043,472948,474249,475154,475550,476455,477756,478661,479962,480867,482168,483073,483469,484374,485675,486580,487881,488786,490087,490992,491388,492293,493594,494499,495800,496705,498006,498911,499307,500212,501513,502418,503719,504624,505925,506830,507226,508131,509432,510337,511638,512543,513844,514749,515145,516050,517351,518256,519557,520462,521763,522668,523064,523969,525270,526175,527476,528381,529682,530587,530983,531888,533189,534094,535395,536300,537601,538506,538902,539807,541108,542013,543314,544219,545520,546425,546821,547726,549027,549932,551233,552138,553439,554344,554740,555645,556946,557851,559152,560057,561358,562263,562659,563564,564865,565770,567071,567976,569277,570182,570578,571483,572784,573689,574990,575895,577196,578101,578497,579402,580703,581608,582909,583814,585115,586020,586416,587321,588622,589527,590828,591733,593034,593939,594335,595240,596541,597446,598747,599652,600953,601858,602254,603159,604460,605365,606666,607571,608872,609777,610173,611078,612379,613284,614585,615490,616791,617696,618092,618997,620298,621203,622504,623409,624710,625615,626011,626916,628217,629122,630423,631328,632629,633534,633930,634835,636136,637041,638342,639247,640548,641453,641849,642754,644055,644960,646261,647166,648467,649372,649768,650673,651974,652879,654180,655085,656386,657291,657687,658592,659893,660798,662099,663004,664305,665210,665606,666511,667812,668717,670018,670923,672224,673129,673525,674430,675731,676636,677937,678842,680143,681048,681444,682349,683650,684555,685856,686761,688062,688967,689363,690268,691569,692474,693775,694680,695981,696886,697282,698187,699488,700393,701694,702599,703900,704805,705201,706106,707407,708312,709613,710518,711819,712724,713120,714025,715326,716231,717532,718437,719738,720643,721039,721944,723245,724150,725451,726356,727657,728562,728958,729863,731164,732069,733370,734275,735576,736481,736877,737782,739083,739988,741289,742194,743495,744400,744796,745701,747002,747907,749208,750113,751414,752319,752715,753620,754921,755826,757127,758032,759333,760238,760634,761539,762840,763745,765046,765951,767252,768157,768553,769458,770759,771664,772965,773870,775171,776076,776472,777377,778678,779583,780884,781789,783090,783995,784391,785296,786597,787502,788803,789708,791009,791914,792310,793215,794516,795421,796722,797627,798928,799833,800229,801134,802435,803340,804641,805546,806847,807752,808148,809053,810354,811259,812560,813465,814766,815671,816067,816972,818273,819178,820479,821384,822685,823590,823986,824891,826192,827097,828398,829303,830604,831509,831905,832810,834111,835016,836317,837222,838523,839428,839824,840729,842030,842935,844236,845141,846442,847347,847743,848648,849949,850854,852155,853060,854361,855266,855662,856567,857868,858773,860074,860979,862280,863185,863581,864486,865787,866692,867993,868898,870199,871104,871500,872405,873706,874611,875912,876817,878118,879023,879419,880324,881625,882530,883831,884736,886037,886942,887338,888243,889544,890449,891750,892655,893956,894861,895257,896162,897463,898368,899669,900574,901875,902780,903176,904081,905382,906287,907588,908493,909794,910699,911095,912000,913301,914206,915507,916412,917713,918618,919014,919919,921220,922125,923426,924331,925632,926537,927838,929139,930044,931345,932250,933551,934456,935757,937058,937963,939264,940169,941470,942375,943676,944977,945882,947183,948088,949389,950294,951595,952896,953801,955102,956007,957308,958213,959514,960815,961720,963021,963926,965227,966132,967433,968734,969639,970940,971845,973146,974051,975352,976653,977558,978859,979764,981065,981970,983271,984572,985477,986778,987683,988984,989889,991190,992491,993396,994697,995602,996903,997808,999109) ORDER BY id