Milushkov V.I., Gatchin Y.A. —
Using a binary search to optimize the query to retrieve data
// Cybernetics and programming. – 2012. – ¹ 2.
– P. 1 - 9.
DOI: 10.7256/2306-4196.2012.2.13867
URL: https://en.e-notabene.ru/kp/article_13867.html
Read the article
Abstract: With the increasing popularity of DBMS its use inevitably begins to demand more and more resources. The first time is possible (and, of course, necessary) to lower the load through optimization of algorithms and / or architecture of the application. However, what if anything that can be optimized is already optimized, and the application still cannot cope with the load? In this article the methods and ways to use binary search to optimize the query to retrieve data are reviewed. Authors giv an overview of php + MySQL and solved the problem of the transfering the queue from fields without indexes to tables with primary keys, which significantly speeds up the query and the database itself. Proposed solution greatly accelerates the search for the desired item by reducing the search range but at the same time sacrificing some accuracy computations. For statistical reasons it is not critical if a few elements of millions will not be taken into account. Otherwise, it is necessary to make and complete epsilon zero search only after reaching the last level of the tree.