Improving Speed Performance of Select Random Query in SQL Database - Utomo, Muhammad Nur Yasir; Bastian, Alvian; Winursito, Anggun (INTEK: Jurnal Penelitian, 2020)
Select random is a query in a SQL database that can retrieve data randomly from a table. Select random is often used to present data in various applications such as websites, data mining and others. Unfortunately, ordinary select random query is inefficient in terms of processing time if used in large table. This paper, tries to solve this problem by proposing two optimized methods of select random query, namely the Small Percentage Order by Rand (SPO-Rand) and the Filtered Column Order by Rand (FCO-Rand). The two proposed methods are then compared in terms of processing speed with a standard Select Random query or Normal Order by Rand (NO-Rand). The scenario of the experiment is to collect five random data from several data sets, ranging from 10.000 to 200.000 data. Based on the results of experiments that have been conducted, the proposed FCO-Rand method obtained the best process speed with 0.074 seconds at 200.000 data, followed by SPO-Rand with 0.265 seconds. These result are much faster than the standard random select method (NO-Rand) which takes up to 7,035 seconds for the same task.