Привет, kzv. Год назад в новогодние праздники был разговор о sqlite и о ядрах бирж.
Я тут накидал биржу прямо внутри PostgreSQL .. 2 функции всего купить битки за рубли и продать.
200 ордеров выполняются чуть больше чем за 2 секунды. Нормально?
1578325171347409
SystemSeconds:1578325171.347409
select buybtcR(783.10,0.00394383,2);select sellbtcR(197.55,0.00911647,2);
select buybtcR(277.77,0.00768230,2);select sellbtcR(628.87,0.00477397,2);
select buybtcR(952.23,0.00513401,3);select sellbtcR(717.30,0.00635712,2);
select buybtcR(16.30,0.00606969,2);select sellbtcR(804.18,0.00137232,3);
select buybtcR(129.79,0.00400944,3);select sellbtcR(218.26,0.00998924,2);
select buybtcR(612.64,0.00839112,3);select sellbtcR(524.29,0.00637552,1);
select buybtcR(292.52,0.00972775,2);select sellbtcR(769.91,0.00526745,2);
select buybtcR(283.31,0.00891529,1);select sellbtcR(919.03,0.00807725,2);
select buybtcR(526.00,0.00949327,3);select sellbtcR(663.23,0.00192214,2);
select buybtcR(64.17,0.00348893,3);select sellbtcR(63.10,0.00457702,3);
select buybtcR(902.21,0.00970634,1);select sellbtcR(539.76,0.00266666,1);
select buybtcR(512.54,0.00760249,2);select sellbtcR(39.28,0.00531606,3);
select buybtcR(930.81,0.00931835,1);select sellbtcR(738.53,0.00284293,1);
select buybtcR(687.86,0.00354049,1);select sellbtcR(880.08,0.00440104,1);
select buybtcR(228.97,0.00330337,3);select sellbtcR(686.67,0.00350360,3);
select buybtcR(657.30,0.00588640,1);select sellbtcR(923.97,0.00439560,1);
select buybtcR(684.22,0.00814767,2);select sellbtcR(215.82,0.00482491,3);
select buybtcR(147.66,0.00920128,3);select sellbtcR(431.95,0.00641081,1);
select buybtcR(786.00,0.00281059,1);select sellbtcR(226.11,0.00447034,3);
select buybtcR(556.44,0.00276235,3);select sellbtcR(906.80,0.00169607,3);
select buybtcR(495.44,0.00126075,2);select sellbtcR(935.00,0.00984752,2);
select buybtcR(749.77,0.00383188,1);select sellbtcR(232.26,0.00294160,2);
select buybtcR(152.39,0.00244413,3);select sellbtcR(793.47,0.00125475,3);
select buybtcR(74.53,0.00745071,3);select sellbtcR(521.56,0.00052529,1);
select buybtcR(797.80,0.00240062,1);select sellbtcR(967.41,0.00656564,1);
select buybtcR(93.48,0.00759735,2);select sellbtcR(78.23,0.00520210,3);
select buybtcR(461.42,0.00204655,3);select sellbtcR(755.58,0.00573319,3);
select buybtcR(999.99,0.00157807,3);select sellbtcR(125.47,0.00889956,3);
select buybtcR(870.54,0.00054058,3);select sellbtcR(923.07,0.00004162,2);
select buybtcR(163.13,0.00180372,1);select sellbtcR(819.70,0.00913027,2);
select buybtcR(579.43,0.00552485,2);select sellbtcR(99.64,0.00687387,2);
select buybtcR(304.30,0.00757294,1);select sellbtcR(877.61,0.00576971,2);
select buybtcR(35.42,0.00628910,1);select sellbtcR(925.38,0.00833239,3);
select buybtcR(979.43,0.00831037,1);select sellbtcR(983.60,0.00903366,2);
select buybtcR(163.97,0.00497259,3);select sellbtcR(76.99,0.00888949,2);
select buybtcR(629.48,0.00248044,1);select sellbtcR(316.87,0.00700620,1);
select buybtcR(74.16,0.00231428,3);select sellbtcR(651.13,0.00223656,3);
select buybtcR(280.04,0.00971466,2);select sellbtcR(113.28,0.00719269,1);
select buybtcR(944.32,0.00592540,3);select sellbtcR(847.68,0.00336351,3);
select buybtcR(344.94,0.00003231,2);select sellbtcR(233.89,0.00833243,2);
select buybtcR(481.94,0.00482950,3);select sellbtcR(182.56,0.00712087,1);
select buybtcR(413.98,0.00040864,2);select sellbtcR(637.64,0.00673936,2);
select buybtcR(609.11,0.00184622,2);select sellbtcR(328.37,0.00730729,3);
select buybtcR(920.91,0.00202213,2);select sellbtcR(257.27,0.00653130,3);
select buybtcR(260.50,0.00087644,1);select sellbtcR(93.74,0.00686125,1);
select buybtcR(576.69,0.00361601,1);select sellbtcR(288.78,0.00666557,3);
select buybtcR(329.64,0.00288379,3);select sellbtcR(3.58,0.00984363,3);
select buybtcR(188.20,0.00331479,2);select sellbtcR(918.93,0.00958637,1);
select buybtcR(121.14,0.00699075,3);select sellbtcR(774.27,0.00383832,1);
select buybtcR(861.92,0.00916273,3);select sellbtcR(548.04,0.00793657,3);
select buybtcR(909.64,0.00904933,2);select sellbtcR(576.20,0.00498144,1);
select buybtcR(864.58,0.00273911,1);select sellbtcR(848.94,0.00463662,1);
select buybtcR(180.42,0.00291053,2);select sellbtcR(139.06,0.00727550,1);
select buybtcR(838.13,0.00492422,1);select sellbtcR(221.97,0.00178208,1);
select buybtcR(138.24,0.00121259,2);select sellbtcR(931.90,0.00324807,2);
select buybtcR(836.83,0.00622095,2);select sellbtcR(334.97,0.00496074,3);
select buybtcR(608.88,0.00658831,3);select sellbtcR(72.55,0.00151230,2);
select buybtcR(363.60,0.00647207,2);select sellbtcR(91.15,0.00331386,2);
select buybtcR(583.57,0.00934495,2);select sellbtcR(761.78,0.00658747,3);
select buybtcR(883.04,0.00157272,3);select sellbtcR(207.84,0.00517715,3);
select buybtcR(829.94,0.00426199,3);select sellbtcR(326.01,0.00244327,3);
select buybtcR(984.84,0.00638654,1);select sellbtcR(136.07,0.00897560,2);
select buybtcR(783.28,0.00005409,3);select sellbtcR(114.67,0.00293678,3);
select buybtcR(49.16,0.00721006,2);select sellbtcR(707.91,0.00986467,2);
select buybtcR(865.18,0.00473894,3);select sellbtcR(382.90,0.00099559,2);
select buybtcR(809.10,0.00657120,1);select sellbtcR(53.42,0.00051508,2);
select buybtcR(692.08,0.00780868,3);select sellbtcR(589.64,0.00119111,1);
select buybtcR(595.05,0.00529899,2);select sellbtcR(888.72,0.00304285,1);
select buybtcR(609.73,0.00169820,2);select sellbtcR(596.20,0.00618925,2);
select buybtcR(70.09,0.00829808,1);select sellbtcR(169.65,0.00923728,1);
select buybtcR(826.77,0.00225491,3);select sellbtcR(878.28,0.00357193,3);
select buybtcR(659.15,0.00814909,2);select sellbtcR(778.26,0.00257469,3);
select buybtcR(308.16,0.00836104,1);select sellbtcR(612.44,0.00198021,2);
select buybtcR(782.26,0.00674605,1);select sellbtcR(401.19,0.00200352,1);
select buybtcR(231.00,0.00434009,1);select sellbtcR(154.72,0.00532846,2);
select buybtcR(380.21,0.00014579,2);select sellbtcR(737.41,0.00305408,1);
select buybtcR(552.32,0.00649659,3);select sellbtcR(809.79,0.00685986,1);
select buybtcR(645.89,0.00311950,3);select sellbtcR(843.91,0.00532960,3);
select buybtcR(518.51,0.00642692,2);select sellbtcR(718.87,0.00362154,1);
select buybtcR(152.88,0.00677812,2);select sellbtcR(685.72,0.00063561,2);
select buybtcR(700.30,0.00618958,1);select sellbtcR(5.71,0.00001125,3);
select buybtcR(655.37,0.00261570,3);select sellbtcR(341.35,0.00181161,3);
select buybtcR(653.30,0.00879009,1);select sellbtcR(186.26,0.00885014,3);
select buybtcR(828.96,0.00503461,3);select sellbtcR(191.11,0.00904170,1);
select buybtcR(868.92,0.00706067,1);select sellbtcR(932.48,0.00738959,1);
select buybtcR(551.44,0.00926576,3);select sellbtcR(552.57,0.00494407,1);
select buybtcR(814.14,0.00799646,2);select sellbtcR(995.30,0.00657201,3);
select buybtcR(874.31,0.00324541,3);select sellbtcR(759.32,0.00637771,1);
select buybtcR(262.78,0.00794910,2);select sellbtcR(166.95,0.00470564,2);
select buybtcR(873.02,0.00865085,3);select sellbtcR(611.98,0.00412483,1);
select buybtcR(538.56,0.00645602,2);select sellbtcR(32.96,0.00579021,2);
select buybtcR(832.61,0.00518151,3);select sellbtcR(489.81,0.00112648,1);
select buybtcR(814.35,0.00048500,1);select sellbtcR(452.12,0.00637656,3);
select buybtcR(247.03,0.00413078,1);select sellbtcR(717.60,0.00017457,2);
select buybtcR(582.68,0.00812947,3);select sellbtcR(995.16,0.00477361,2);
select buybtcR(640.77,0.00074260,1);select sellbtcR(219.79,0.00222602,1);
select buybtcR(737.94,0.00923513,2);select sellbtcR(850.59,0.00438562,3);
select buybtcR(899.09,0.00948911,2);select sellbtcR(536.74,0.00333569,2);
select buybtcR(949.82,0.00477551,1);select sellbtcR(967.28,0.00884318,2);
select buybtcR(780.22,0.00458039,1);select sellbtcR(257.59,0.00904781,2);
1578325173597722
SystemSeconds:1578325173.597722