2020
12-29
12-29
Postgresql排序与limit组合场景性能极限优化详解
1构造测试数据createtabletbl(idint,numint,arrint[]);createindexidx_tbl_arrontblusinggin(arr);createorreplacefunctiongen_rand_arr()returnsint[]as$$selectarray(select(1000*random())::intfromgenerate_series(1,64));$$languagesqlstrict;insertintotblselectgenerate_series(1,3000000),(10000*random())::int,gen_rand_arr();insertintotblselectgenerate_series(1,500),...
继续阅读 >