RU2755568C1 - Method for parallel execution of the join operation while processing large structured highly active data - Google Patents

Method for parallel execution of the join operation while processing large structured highly active data Download PDF

Info

Publication number
RU2755568C1
RU2755568C1 RU2020124733A RU2020124733A RU2755568C1 RU 2755568 C1 RU2755568 C1 RU 2755568C1 RU 2020124733 A RU2020124733 A RU 2020124733A RU 2020124733 A RU2020124733 A RU 2020124733A RU 2755568 C1 RU2755568 C1 RU 2755568C1
Authority
RU
Russia
Prior art keywords
tables
rows
operand
join operation
processing
Prior art date
Application number
RU2020124733A
Other languages
Russian (ru)
Original Assignee
Смоленская общественная организация содействия науке и образованию «Региональный союз ученых»
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Смоленская общественная организация содействия науке и образованию «Региональный союз ученых» filed Critical Смоленская общественная организация содействия науке и образованию «Региональный союз ученых»
Priority to RU2020124733A priority Critical patent/RU2755568C1/en
Application granted granted Critical
Publication of RU2755568C1 publication Critical patent/RU2755568C1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

FIELD: data processing.
SUBSTANCE: invention relates to a method for parallel execution of the JOIN operation while processing large structured highly active data. In the method, in a computer-implemented data manipulation system using the SQL language, after the host processor receives both operand tables and the row selection conditions in the operation, the rows of the operand tables are distributed among a set of processing modules in the form of fragment tables, followed by parallel execution of the SQL JOIN operation in the processing modules over said fragments of operand tables while simultaneously combining the results, wherein the distribution of the rows of fragment tables among the set of processing modules is preceded by the host processor forming an index table for each operand table, wherein each row comprises the value of the key of the SQL JOIN operation and the value of the amount of rows in said operand table, corresponding to the key, the operation of intersection of the formed index tables is executed while calculating the product of the use frequencies of the keys of the SQL JOIN operation in the operand tables, the obtained summary metadata table is sorted in the descending order of the values of the product of the use frequencies of the keys, the rows of operand tables are selected for the fragment tables according to the values of the keys corresponding to the rows of the summary metadata table so that each pair of fragment tables in one processing module only comprises the rows of the operand tables with the same key value.
EFFECT: increasing productivity of data processing.
1 cl, 5 dwg

Description

Изобретение относится к области способов обработки данных в части получения информационных выборок по запросу пользователя и может быть использовано в оборудовании обработки данных.The invention relates to the field of data processing methods in terms of obtaining information samples at the user's request and can be used in data processing equipment.

Постоянное увеличение объема данных и многообразие форматов их представления, потребность их применения в различных сферах деятельности общества обуславливают необходимость в совершенствовании способов их обработки. Одним из направлений повышения скорости обработки больших структурированных высокоактивных данных является совершенствование способов выполнения запросов (https://www.oracle.com/ru/emerging-technologies/), в том числе и при выполнении операции JOIN посредством параллельного ее выполнения над фрагментами таблиц из запроса пользователя с последующим объединением результатов (https://www.teradata.com, https://www.ibm.com/it-infrastructure/power/accelerated-computing). Согласно (Carlson, R., Steen, В., Tillman, A.M., &

Figure 00000001
G. LCI data modelling and a database design. The International Journal of Life Cycle Assessment, 3(2), PP. 106-113), к высокоактивным данным относятся данные, коэффициент активности использования которых равен или стремится к единице, и характеризуется отношением их общего количества к количеству данных, задействованных при выполнении операций над ними. К числу отраслей, в которых используются такие данные, относятся государственный сектор, здравоохранение, производство, финансовые услуги, энергетика и добыча природных ресурсов, связь и мультимедиа, туризм и транспорт, направленные на финансовую трансформацию, оптимизацию активов, взаимодействие с потребителями (клиентами) (https://azure.microsoft.com/ru-ru/solutions/#solutions-by-industry, https://www.sas.com/ru_ru/software/how-to-buy/request-price-quote.html, https://www.oracle.com/ru/emerging-technologies/).The constant increase in the volume of data and the variety of formats for their presentation, the need for their use in various spheres of society's activities determine the need to improve the methods of their processing. One of the ways to increase the processing speed of large structured highly active data is to improve the ways of executing queries (https://www.oracle.com/ru/emerging-technologies/), including when performing the JOIN operation by means of its parallel execution on fragments of tables from user request followed by combining the results (https://www.teradata.com, https://www.ibm.com/it-infrastructure/power/accelerated-computing). According to (Carlson, R., Steen, B., Tillman, AM, &
Figure 00000001
G. LCI data modeling and a database design. The International Journal of Life Cycle Assessment, 3 (2), PP. 106-113), highly active data includes data, the activity rate of which is equal to or tends to one, and is characterized by the ratio of their total amount to the amount of data involved in performing operations on them. Industries that use such data include the public sector, healthcare, manufacturing, financial services, energy and natural resource extraction, communications and multimedia, tourism and transport aimed at financial transformation, asset optimization, interaction with consumers (clients) ( https://azure.microsoft.com/en-ru/solutions/#solutions-by-industry, https://www.sas.com/en_ru/software/how-to-buy/request-price-quote.html , https://www.oracle.com/ru/emerging-technologies/).

Известен способ, описанный в изобретении «Cardinality and Selectivity Estimation Using Asingle Table JOIN Index» (МПК: G06F 17/30, патент на изобретение US 8914354 B2, дата публикации 16.12.2014), включающий в себя запрос к базе данных, который содержит один или несколько предикатов запроса и ссылается на одну или несколько таблиц базы данных. В запросе идентифицирован один или несколько индексов соединения для соответствующих таблиц базы данных по запросу базы данных. Индексы соединения содержат предикаты индекса соединения и включают один или несколько столбцов соединения в списке выбора. Количество строк, выбранное предикатами запроса, рассчитывается, по крайней мере, частично с использованием количества строк или статистики одного или нескольких индексов соединения. Селективность предиката базовой таблицы рассчитывается, по меньшей мере, частично из рассчитанного количества строк. Количество элементов объединения оценивается, по меньшей мере, частично из числа строк и статистики идентифицированного индексов объединения. Недостатком данного способа является низкая скорость выполнения операции JOIN при обработке больших структурированных высокоактивных данных, что обусловлено наличием практически всех возможных значений ключей, определяемых условием отбора, в обоих таблицах-операндах операции JOIN.The known method described in the invention "Cardinality and Selectivity Estimation Using Asingle Table JOIN Index" (IPC: G06F 17/30, patent for invention US 8914354 B2, publication date 12/16/2014), including a database query that contains one or multiple query predicates and refers to one or more database tables. The query identified one or more join indexes for the corresponding database tables by the database query. Join indexes contain join index predicates and include one or more join columns in a picklist. The number of rows selected by the query predicates is calculated at least in part using the number of rows or statistics from one or more join indices. The selectivity of the base table predicate is calculated at least in part from the calculated number of rows. The cardinality of a join is estimated at least in part from the number of rows and statistics of the identified join indices. The disadvantage of this method is the low speed of the JOIN operation when processing large structured highly active data, which is due to the presence of almost all possible key values determined by the selection condition in both operand tables of the JOIN operation.

Известен способ, описанный в изобретении «JOIN Operation Partitioining» (МПК: G06F 7/00, G06F 17/30, патент на изобретение US 9665624 B2, дата публикации 18.12.2014), заключающийся в распределении таблиц на основе вычисления хеш-индексов ключей таблиц. Недостатком данного способа является низкая скорость выполнения операции JOIN при обработке больших структурированных высокоактивных данных, что обусловлено увеличением времени распределения таблиц при использовании хеш-индексов.The known method described in the invention "JOIN Operation Partitioining" (IPC: G06F 7/00, G06F 17/30, patent for invention US 9665624 B2, publication date 12/18/2014), consisting in the distribution of tables based on the calculation of hash indexes of table keys ... The disadvantage of this method is the low speed of the JOIN operation when processing large structured highly active data, which is due to the increase in the distribution time of tables when using hash indexes.

Наиболее близким по технической сущности к заявляемому изобретению является способ, описанный в изобретении «System, Method, and Computer-readable Medium for Duplication Optimization for Parallel JOIN Operations on Similarly Large Skewed Tables» (МПК: G06F 17/30, патент на изобретение US 8099409 B2, дата публикации 17.01.2012), заключающийся в получении обеих таблиц-операндов и условия отбора строк в операции, распределении строк таблиц-операндов в форме таблиц-фрагментов между множеством модулей обработки с последующим параллельным выполнением операции JOIN в модулях обработки и одновременным объединением результатов. Недостатком данного способа является низкая скорость выполнения операции JOIN при обработке больших структурированных высокоактивных данных, что обусловлено использованием таблицы-фрагмента, которая представляет собой полную таблицу-операнд, содержащую, в том числе не используемые при выполнении операции JOIN строки.The closest in technical essence to the claimed invention is the method described in the invention "System, Method, and Computer-readable Medium for Duplication Optimization for Parallel JOIN Operations on Similarly Large Skewed Tables" (IPC: G06F 17/30, patent for invention US 8099409 B2, publication date 01/17/2012), which consists in obtaining both operand tables and the conditions for selecting rows in the operation, distributing the rows of operand tables in the form of fragment tables between multiple processing modules, followed by the parallel execution of the JOIN operation in processing modules and simultaneously combining the results ... The disadvantage of this method is the low speed of the JOIN operation when processing large structured highly active data, which is due to the use of a fragment table, which is a complete operand table containing, among other things, rows not used when performing the JOIN operation.

Технической задачей изобретения является повышение скорости обработки больших структурированных высокоактивных данных.The technical problem of the invention is to increase the processing speed of large structured highly active data.

Технический результат изобретения состоит в снижении времени выполнения операции JOIN при обработке больших структурированных высокоактивных данных.The technical result of the invention is to reduce the execution time of the JOIN operation when processing large structured highly active data.

Это достигается тем, что в известном способе, включающем получение обеих таблиц-операндов и условия отбора строк в операции, распределение строк таблиц-операндов в форме таблиц-фрагментов между множеством модулей обработки с последующим параллельным выполнением операции JOIN в модулях обработки и одновременным объединением результатов, распределению строк таблиц-фрагментов между множеством модулей обработки предшествует формирование сводной таблицы метаданных на основе вычисления частоты вхождения строк с каждым значением ключа операции JOIN в таблицах-операндах и последующее распределение строк из обеих таблиц-операндов в таблицы-фрагменты осуществляется на основе сводной таблицы метаданных, причем каждая пара таблиц-фрагментов в одном модуле обработки содержит только те строки, значения ключей которых находятся во взаимно-однозначном соответствии друг другу.This is achieved by the fact that in the known method, which includes obtaining both operand tables and the conditions for selecting rows in the operation, the distribution of the rows of the operand tables in the form of table fragments between multiple processing units, followed by parallel execution of the JOIN operation in processing units and the simultaneous combination of the results, the distribution of the rows of the tables-fragments between the set of processing modules is preceded by the formation of a pivot table of metadata based on the calculation of the frequency of occurrence of rows with each value of the JOIN operation key in the operand tables and the subsequent distribution of rows from both tables-operands into tables-fragments is carried out on the basis of the pivot table of metadata, moreover, each pair of fragment tables in one processing unit contains only those rows whose key values are in one-to-one correspondence with each other.

Сущность изобретения поясняется чертежами, где на фиг. 1 представлена обобщенная структурная схема системы, реализующей способ параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных, на фиг. 2 представлен способ параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных, на фиг. 3 представлен алгоритм формирования сводной таблицы метаданных на основе вычисления частоты использования ключей операции JOIN в таблицах-операндах, на фиг. 4 представлен алгоритм распределения строк из обеих таблиц-операндов в таблицы-фрагменты в каждый модуль обработки на основе сводной таблицы метаданных.The essence of the invention is illustrated by drawings, where FIG. 1 is a generalized block diagram of a system that implements a method for parallel execution of a JOIN operation when processing large structured highly active data; FIG. 2 shows a method for parallel execution of a JOIN operation when processing large structured highly active data; FIG. 3 shows an algorithm for generating a summary table of metadata based on calculating the frequency of using the keys of the JOIN operation in the operand tables; FIG. 4 shows an algorithm for distributing rows from both operand tables into fragment tables in each processing module based on the pivot metadata table.

На графических изображениях приняты следующие обозначения:The following designations are adopted in the graphic images:

Р, Q - таблицы-операнды операции JOINР, Q - tables-operands of the JOIN operation

indP, indQ - таблицы метаданных для таблиц-операндов Ρ и Q соответственно;indP, indQ - metadata tables for operand tables Ρ and Q, respectively;

indPQ - сводная таблица метаданных 123;indPQ - pivot table of metadata 123;

nHi - вспомогательная переменная, используемая для обращения к строке из таблицы метаданных 123;nHi is an auxiliary variable used to refer to a row from the 123 metadata table;

nLow - вспомогательная переменная, используемая для обращения к строке из таблицы метаданных 123;nLow is an auxiliary variable used to refer to a row from the 123 metadata table;

nPM - вспомогательная переменная, соответствующая порядковому номеру модуля обработки 1101…110Z из диапазона 1…z;nPM - auxiliary variable corresponding to the serial number of the processing module 110 1 ... 110 Z from the range 1 ... z;

Key(j) - операция получения значения ключа строки с номером j;Key (j) - operation of obtaining the key value of the row number j;

kHi, kLow - вспомогательные переменные, используемые для хранения текущего значения ключа;kHi, kLow - auxiliary variables used to store the current key value;

indPQ.Rowcount - операция определения количества строк в таблице метаданных indPQ;indPQ.Rowcount - operation for determining the number of rows in the indPQ metadata table;

← - операция присваивания переменной значения произвольного типа, в том числе табличного;← - the operation of assigning a variable to a value of an arbitrary type, including a table value;

(nPM+1) MOD z - операция увеличения на единицу целого числа по модулю z;(nPM + 1) MOD z - operation of increasing by one integer modulo z;

indP ∩ indQ(indP.K, indP.M×indQ.M) - результат выполнения операции пересечения таблиц indP и indQ с вычислением произведения частот indP.M×indQ.M использования ключей K операции JOIN в таблицах-операндах.indP ∩ indQ (indP.K, indP.M × indQ.M) is the result of performing the intersection operation of indP and indQ tables with calculating the product of frequencies indP.M × indQ.M using the keys K of the JOIN operation in the operand tables.

Способ параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных осуществляется с помощью системы, изображенной на фиг.1.The method of parallel execution of the JOIN operation when processing large structured highly active data is carried out using the system shown in Fig. 1.

Система 100 включает в себя: систему клиента 135, сеть передачи данных 125 и систему манипулирования данными 150.System 100 includes: client system 135, data network 125, and data manipulation system 150.

Система клиента 135 представляет собой электронное устройство, располагающее аппаратными и программными возможностями манипулирования данными с использованием СУБД на основе SQL, например, сервер баз данных, настольный компьютер, мобильный компьютер, планшет, мобильный телефон и так далее. Реализация манипулирования данными на основе SQL в электронных устройствах известно из области техники и в настоящем описании подробно не рассматривается. Несмотря на то, что в описании упоминается одна система клиента, система 100 может включать более одной системы клиента 135.The client system 135 is an electronic device that has hardware and software capabilities for manipulating data using a SQL-based DBMS, such as a database server, desktop computer, mobile computer, tablet, mobile phone, and so on. Implementation of SQL-based data manipulation in electronic devices is known in the art and is not discussed in detail herein. Although a single client system is mentioned in the description, system 100 may include more than one client system 135.

Сеть 125 для передачи данных может быть представлена в виде глобальной, локальной, частной сети передачи данных. В сети 125 обмен данными возникает по линиям передачи данных разного типа, например, по беспроводным или проводным линиям.The data network 125 can be represented as a global, local, private data network. In the network 125, communication occurs over different types of data lines, such as wireless or wired lines.

Система манипулирования данными 150 состоит из хост-процессора 120, представляющего собой программно-аппаратный комплекс, в состав аппаратных средств которого входит, как минимум, один многоядерные процессор, например, CPU Intel Core i7, Intel Xeon, устройства взаимодействия с глобальной, локальной частной сетями передачи данных и высокоскоростной локальной вычислительной сетью, а в состав программных средств которого входят операционная система, обеспечивающая многопоточное выполнение приложений, СУБД с процедурным языком манипулирования данными, например, Transact-SQL, PL/SQL, PL/pgSQL. Устройство и принцип работы хост-процессора 120 известен из области техники и в настоящем описании подробно не рассматривается. Хост-процессор 120 связан с модулями обработки 1051…105z посредством высокоскоростной локальной сети 130, например, Infiniband. Модули обработки 1051…105z представляют собой программно-аппаратные комплексы, которые имеют архитектуру аналогичную хост-процессору 120, но могут отличиться от него вычислительной производительностью и отсутствием средств взаимодействия с глобальной, локальной частной сетями передачи данных. Каждый из модулей обработки 1051…l05z связан с накопителем данных 1101…110z, представляющим собой не менее одного устройства для хранения данных, например твердотельного накопителя. Способы передачи данных между элементами системы манипулирования данными 150 известны из области техники и в настоящем описании подробно не рассматриваются. В состав программного обеспечения хост-процессора 120 включена программа-оптимизатор 122, реализующая заявленный способ.The data manipulation system 150 consists of a host processor 120, which is a software and hardware complex, the hardware of which includes at least one multi-core processor, for example, an Intel Core i7 CPU, Intel Xeon, a device for interacting with a global, local private network data transfer and a high-speed local area network, and the software of which includes an operating system that provides multithreaded execution of applications, a DBMS with a procedural data manipulation language, for example, Transact-SQL, PL / SQL, PL / pgSQL. The structure and operation of host processor 120 is known in the art and is not discussed in detail herein. Host processor 120 communicates with processing units 105 1 ... 105 z via a high speed local area network 130 such as Infiniband. Processing modules 105 1 ... 105 z are software and hardware systems that have an architecture similar to the host processor 120, but may differ from it in computing performance and lack of means of interaction with global, local private data transmission networks. Each of the processing modules 105 1 ... l05 z is associated with a data storage device 110 1 ... 110 z , which is at least one device for storing data, such as a solid state drive. Methods for transferring data between elements of data manipulation system 150 are known in the art and are not discussed in detail herein. The host processor 120 software includes an optimizer program 122 that implements the claimed method.

На фиг. 2 представлен способ параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных.FIG. 2 shows a method of parallel execution of the JOIN operation when processing large structured highly active data.

На этапе 201 осуществляется получение таблиц-операндов 136 и 137 и условий отбора строк по глобальной, локальной, частной сетям передачи данных 125 от системы клиента 135 в хост-процессор 120, который выполняет код программы-оптимизатора 122. Способ передачи таблиц-операндов и условия отбора строк по глобальной, локальной частной сетям передачи данных известен из области техники и в настоящем описании подробно не рассматривается.At step 201, the operand tables 136 and 137 and the row selection conditions are obtained over the global, local, private data networks 125 from the client system 135 to the host processor 120, which executes the code of the optimizer program 122. The method of transferring the operand tables and conditions selection of rows over a wide area, local private data transmission network is known in the art and is not discussed in detail in the present description.

На этапе 202 при выполнении кода программы-оптимизатора 122 осуществляется формирование сводной таблицы метаданных indPQ на основе вычисления частоты вхождения строк с каждым значением ключа операции JOIN в таблицах-операндах.At step 202, when the code of the optimizer 122 is executed, the indPQ metadata pivot table is generated based on the calculation of the frequency of occurrence of rows with each JOIN key value in the operand tables.

На этапе 203 производится распределение строк из таблиц-операндов Ρ и Q в таблицы-фрагменты 1111…112z в каждый модуль обработки 1051…105z на основе сводной таблицы метаданных indPQ.At step 203, the distribution of rows from the operand tables Ρ and Q into the table fragments 111 1 ... 112 z to each processing module 105 1 ... 105 z based on the indPQ metadata pivot table.

На этапе 204 выполняется операция JOIN над таблицами-фрагментами 1111…112z в каждом модуле обработки 1051…105z с одновременным объединением результатов. Способ выполнения операции JOIN в модулях обработки известен из области техники и в настоящем описании подробно не рассматривается.At step 204, a JOIN operation is performed on the slice tables 111 1 ... 112 z in each processing unit 105 1 ... 105 z while concatenating the results. The method of performing a JOIN operation in processing units is known in the art and is not discussed in detail here.

Этап 202 реализуется с помощью последовательности действий, представленных на фиг. 3. Этап 203 реализуется с помощью последовательности действий, представленных на фиг. 4.Block 202 is implemented using the flowchart of FIG. 3. Step 203 is performed using the sequence of actions shown in FIG. 4.

На этапе 301 оптимизатором 122 для каждого значения ключа операции JOIN, входящего в условие отбора, производится подсчет количества строк в таблице-операнде Ρ (136), соответствующих данному значению ключа, с занесением значения ключа и частоты вхождения строк в индексную таблицу indP. Данный этап может быть выполнен, например, с помощью SQL-запроса:At step 301, the optimizer 122, for each JOIN key value included in the selection condition, counts the number of rows in the operand table (136) corresponding to the given key value, with the key value and the frequency of occurrence of the rows in the indP index table. This stage can be performed, for example, using an SQL query:

INSERT INTO indP (K, M) SELECT PK, SUM(1) AS Μ FROM Ρ ORDER BY P.K GROUP BY P.K;INSERT INTO indP (K, M) SELECT PK, SUM (1) AS Μ FROM Ρ ORDER BY P.K GROUP BY P.K;

На этапе 302 оптимизатором 122 для каждого значения ключа операции JOIN, входящего в условие отбора, производится подсчет количества строк в таблице-операнде Q (137), соответствующих данному значению ключа, с занесением значения ключа и частоты вхождения строк в индексную таблицу indQ. Данный этап может быть выполнен, например, с помощью SQL-запроса:At step 302, the optimizer 122, for each JOIN key value included in the selection condition, counts the number of rows in the operand table Q (137) corresponding to the given key value, with the key value and the frequency of occurrence of the rows in the indQ index table. This stage can be performed, for example, using an SQL query:

INSERT INTO indQ (K, Μ) SELECT Q.K, SUM(1) AS Μ FROM Q ORDER BY Q.K GROUP BY Q.K;INSERT INTO indQ (K, Μ) SELECT Q.K, SUM (1) AS Μ FROM Q ORDER BY Q.K GROUP BY Q.K;

На этапе 303 оптимизатором 122 выполняется операция пересечения индексных таблиц indP и indQ, в результате выполнения которой получается сводная таблица метаданных indPQ 123. Сводная таблица метаданных содержит N строк по количеству значений ключа, участвующих в операции JOIN. При этом для больших структурированных высокоактивных данных число N больше числа модулей обработки 1051…105z.In step 303, the optimizer 122 intersects the indP and indQ index tables, resulting in a metadata pivot table indPQ 123. The metadata pivot table contains N rows by the number of key values involved in the JOIN operation. In this case, for large structured highly active data, the number N is greater than the number of processing modules 105 1 ... 105 z .

На этапе 304 оптимизатором 122 сводная таблица метаданных indPQ 123 упорядочивается по убыванию значений величины произведений количеств строк таблиц-операндов.In step 304, the optimizer 122 sorts the indPQ metadata pivot table 123 in descending order of magnitude values of the product numbers of the row numbers of the operand tables.

Этапы 303 и 304 могут быть выполнены, например, с использованием SQL-запроса:Steps 303 and 304 can be performed, for example, using an SQL query:

INSERT INTO indPQ (K, Μ) SELECT indPK, indP.M×indQ.M AS Μ FROM indP, indQ WHERE indP.K=indQ.M ORDER BY Μ DESCINSERT INTO indPQ (K, Μ) SELECT indPK, indP.M × indQ.M AS Μ FROM indP, indQ WHERE indP.K = indQ.M ORDER BY Μ DESC

Выполняется распределение строк таблиц-операндов 136 и 137 между парами таблиц-фрагментов 1111 и 1121, …, 111z и 112z, которое в рамках этапа 203 реализуется алгоритмом распределения строк из обеих таблиц-операндов в таблицы-фрагменты в каждый модуль обработки на основе сводной таблицы метаданных, представленным на фиг. 4.Distribution of rows of operand tables 136 and 137 between pairs of fragment tables 111 1 and 112 1 , ..., 111 z and 112 z is performed, which, in step 203, is implemented by the algorithm for distributing rows from both operand tables into fragment tables in each processing unit based on the metadata pivot table shown in FIG. 4.

На этапе 401 двум вспомогательным переменным nHi и nLow производится присвоение значений, соответствующих номерам первой и последней строк в таблице метаданных indPQ 123, вспомогательной переменной nPM присваивается значение единица.In step 401, the two auxiliary variables nHi and nLow are assigned values corresponding to the numbers of the first and last rows in the indPQ metadata table 123, the auxiliary variable nPM is assigned the value one.

На этапе 402 производится проверка завершенности операции распределения пар таблиц-фрагментов 1111…112z, состоящая в проверке условия nHi≤nLow. Если данное условие выполняется, то осуществляется переход к этапу 403, в противном случае выполнение распределения завершается.At step 402, the completion of the operation of distributing pairs of table-fragments 111 1 ... 112 z is checked, which consists in checking the condition nHi≤nLow. If this condition is met, then the flow goes to step 403, otherwise the distribution is completed.

На этапе 403 из сводной таблицы метаданных indPQ выбираются строки с номерами nHi и nLow, и вспомогательным переменным kHi и kLow присваиваются значения ключей, соответствующих данным строкам.In step 403, rows numbered nHi and nLow are selected from the indPQ metadata pivot table, and the auxiliary variables kHi and kLow are assigned the values of the keys corresponding to these rows.

На этапе 404 производится проверка готовности модуля обработки с номером nPM к получению данных от хост-процессора 122. Если модуль обработки с порядковым номером nPM готов к приему данных, то производится переход к этапу 405, в противном случае - к этапу 407.At step 404, it is checked that the processing unit with the number nPM is ready to receive data from the host processor 122. If the processing unit with the sequence number nPM is ready to receive data, then it goes to step 405, otherwise - to step 407.

На этапе 405 из таблиц-операндов Ρ (136) и Q (137) производится копирование строк, значения ключей которых соответствуют значениям kHi и kLow в таблицы-фрагменты 111nPM и 112nPM на накопителе данных 110nPM модуля обработки 105nPM посредством высокоскоростной локальной сети 130.At step 405, from the operand tables (136) and Q (137), the rows are copied, the key values of which correspond to the values of kHi and kLow, into the fragment tables 111 nPM and 112 nPM on the data storage unit 110 nPM of the processing unit 105 nPM via a high-speed local network 130.

На этапе 406 производится увеличение значения nHi на единицу и уменьшение значения nLow на единицу.At 406, the nHi value is increased by one and the nLow value is decreased by one.

На этапе 407 производится присвоение вспомогательной переменной nPM значения, увеличенного на единицу по модулю z, после чего производится возвращение к этапу 402.At step 407, the auxiliary variable nPM is assigned a value increased by one modulo z, and then returns to step 402.

Технический результат изобретения обеспечивается использованием в заявляемом способе следующих теоретических предпосылок. Для параллельного выполнения операции обработки больших структурированных высокоактивных данных выбрана следующая разновидность операции JOIN:The technical result of the invention is provided by using the following theoretical premises in the claimed method. For the parallel execution of the operation for processing large structured highly active data, the following type of JOIN operation was chosen:

Ρ INNER JOIN Q ON π(P.K, Q.K);Ρ INNER JOIN Q ON π (P.K, Q.K);

Таблицы-операнды Ρ и Q (136 и 137) представляют собой совокупности классов эквивалентности, которые содержат не менее одной строки, и рассматриваются как фактор-множества эквивалентности PK и QK, порожденные ключом K. Предикат π определен на множествах экземпляров ключа K в таблицах-операндах P и Q (136 и 137) и реализует условие отбора. Κ1, …, Kn представляют собой множество значений ключа K. При этом операция JOIN определена как объединение классов эквивалентности новой таблиц-операндов

Figure 00000002
полученных в результате выполнения групповой операции F(PKi×Qki) на декартовом произведении соответствующих классов эквивалентности таблиц-операндов.The operand tables Ρ and Q (136 and 137) are collections of equivalence classes that contain at least one row, and are considered as the factor equivalence sets P K and Q K generated by the key K. The predicate π is defined on the sets of instances of the key K in operand tables P and Q (136 and 137) and implements the selection condition. Κ 1 ,…, K n represent the set of values of the key K. In this case, the JOIN operation is defined as the union of the equivalence classes of the new operand tables
Figure 00000002
obtained as a result of performing the group operation F (P Ki × Q ki ) on the Cartesian product of the corresponding equivalence classes of the operand tables.

Для параллельной реализации операции JOIN используются метаданные, определяющие распределение строк таблицы по классам эквивалентности. При этом таблицам P и Q (136 и 137) ставятся в соответствие индексные таблицы со схемами indP(K, Μ) и indQ(K, Μ), которые представляют собой множества строк indP={<K1, Μ1>, …,<Kn, Mn>} и indQ={<K1, M1>, …, <Kn, Mm>}, где Kj, - значение ключа K, Mj - количество записей в j-м классе эквивалентности, строки которого содержат Kj, Μ - целочисленное поле.For the parallel implementation of the JOIN operation, metadata is used that determines the distribution of table rows by equivalence classes. In this case, tables P and Q (136 and 137) are associated with index tables with schemes indP (K, Μ) and indQ (K, Μ), which are sets of rows indP = {<K 1 , Μ 1 >,…, <K n , M n >} and indQ = {<K 1 , M 1 >,…, <K n , M m >}, where K j is the value of the key K, M j is the number of records in the j-th class equivalence, the lines of which contain K j , Μ is an integer field.

Таблица-результат параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных содержит только те классы эквивалентности, которые принадлежат пересечению индексных таблиц indP ∩ indQ. Результатом выполнения этой операции является сводная таблица метаданных indPQ 123, содержащая составной ключ K и поле М, значение которого равно indP.M×indQ.M и относительно которого сводная таблица метаданных indPQ 123 упорядочена по убыванию.The result table of the parallel execution of the JOIN operation when processing large structured highly active data contains only those equivalence classes that belong to the intersection of indP ∩ indQ index tables. The result of this operation is the indPQ 123 metadata pivot table containing the composite key K and the M field, the value of which is indP.M × indQ.M and relative to which the indPQ 123 metadata pivot table is ordered in descending order.

Использование сводной таблицы метаданных indPQ 123 позволяет распределить таблицы-операнды Ρ и Q (136 и 137) между независимыми модулями обработки 1051…105z в форме пар таблиц-фрагментов 1111 и 1121, 111z и 112z, сохраняемых на накопителях 1101…110Z. При этом классы эквивалентности, записи которых содержат одинаковые значения ключа K, расположены в одной и только одной паре таблиц-фрагментов 1111 и 1121, 111z и 112z.Using the indPQ 123 metadata pivot table allows you to distribute the operand tables Ρ and Q (136 and 137) between independent processing modules 105 1 ... 105 z in the form of pairs of fragment tables 111 1 and 112 1 , 111 z and 112 z stored on drives 110 1 ... 110 Z. In this case, the equivalence classes, the records of which contain the same key values K, are located in one and only one pair of fragment tables 111 1 and 112 1 , 111 z and 112 z .

В результате выполнения операции PnPM INNER JOIN QnPM получается таблица, содержащая

Figure 00000003
строк, где PnPM и QnPM - таблицы-фрагменты 111nPM и 112nPM соответственно в модуле обработки с порядковым номером nPM. При этом очевидно, что чем меньше значение разности между наибольшим Rmax и наименьшим количеством обрабатываемых строк, тем ниже общее время выполнения операции JOIN при обработке больших структурированных высокоактивных данных, содержащихся в таблицах-операндах P и Q (136 и 137).As a result of the operation P nPM INNER JOIN Q nPM , a table is obtained containing
Figure 00000003
rows, where P nPM and Q nPM are fragment tables 111 nPM and 112 nPM, respectively, in the processing module with sequence number nPM. It is obvious that the smaller the difference between the largest R max and the smallest number of processed rows, the lower the total JOIN execution time when processing large structured highly active data contained in the P and Q operand tables (136 and 137).

Снижение времени выполнения операции JOIN при обработке больших структурированных высокоактивных данных в заявленном изобретении следует из того, что сводная таблица метаданных indPQ 123, есть результат операции indP ∩ indQ и пары таблиц-фрагментов 1111 и 1121, …, 111z и 112z не содержат строк, которые не используются при выполнении операции JOIN. В способе, описанном в прототипе, используется таблица-фрагмент, которая представляет собой полную таблицу-операнд, содержащую, в том числе и не используемые при выполнении операции JOIN строки, что увеличивает время выполнения операции JOIN при обработке больших структурированных высокоактивных данных, по сравнению с заявляемым способом.Reducing the execution time of the JOIN operation when processing large structured highly active data in the claimed invention follows from the fact that the summary table of metadata indPQ 123 is the result of the operation indP ∩ indQ and the pair of fragment tables 111 1 and 112 1 , ..., 111 z and 112 z are not contain strings that are not used in the JOIN operation. In the method described in the prototype, a table-fragment is used, which is a complete table-operand containing, among other things, rows not used when performing a JOIN operation, which increases the execution time of a JOIN operation when processing large structured highly active data, compared to the claimed method.

Заявленный технический результат подтверждается результатом вычислительного эксперимента, в ходе которого для параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных использованы программно-аппаратные комплексы:The claimed technical result is confirmed by the result of a computational experiment, during which for the parallel execution of the JOIN operation when processing large structured highly active data, software and hardware complexes were used:

1. В первом случае программно-аппаратный комплекс состоял только из системы клиента 135, на котором располагалась база данных клиента и таблицы 136 и 137, над которыми выполнялась операция JOIN.1. In the first case, the hardware and software complex consisted only of the client 135 system, which contained the client's database and tables 136 and 137, on which the JOIN operation was performed.

2. Во втором случае программно-аппаратных комплекс состоял из системы клиента 135, на котором располагалась база данных клиента и таблицы 136 и 137, системы обработки, в состав которой входили хост-процессор 120 и два модуля обработки 1051 и 1052. Хост-процессор 120 связан с системой клиента 135 через сеть Интернет, а с модулями обработки 1051 и 1052 - высокоскоростной локальной вычислительной сетью.2. In the second case, the hardware-software complex consisted of the client system 135, which housed the client database and tables 136 and 137, the processing system, which included the host processor 120 and two processing modules 105 1 and 105 2 . The host processor 120 communicates with the client system 135 via the Internet and with the processing modules 105 1 and 105 2 through a high-speed local area network.

3. В третьем случае программно-аппаратный комплекс состоял из системы клиента 135, на котором располагалась база данных клиента и таблицы 136 и 137, системы обработки, в состав которой входили хост-процессор 120 и четыре модуля обработки 1051, …, 1054. Хост-процессор 120 связан с системой клиента 135 через сеть Интернет, а с модулями обработки 1051, …, 1054 - высокоскоростной локальной вычислительной сетью.3. In the third case, the hardware and software complex consisted of the client system 135, which housed the client's database and tables 136 and 137, a processing system that included a host processor 120 and four processing modules 105 1 , ..., 105 4 . The host processor 120 is connected to the client system 135 via the Internet, and to the processing modules 105 1 , ..., 105 4 by a high-speed local area network.

Эксперимент проводился для таблиц Ρ и Q (136, 137), число строк в которых изменялось от 4000000 до 25000.000.The experiment was carried out for tables Ρ and Q (136, 137), the number of rows in which varied from 4,000,000 to 25,000,000.

Результаты эксперимента приведены на фиг. 5.The results of the experiment are shown in FIG. 5.

Представленные на фиг. 5 графики подтверждают тот факт, что реализация заявленного способа параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных обеспечивает существенное снижение времени выполнения операции JOIN при обработке больших структурированных высокоактивных данных.Shown in FIG. 5 graphs confirm the fact that the implementation of the claimed method of parallel execution of the JOIN operation when processing large structured highly active data provides a significant reduction in the execution time of the JOIN operation when processing large structured highly active data.

ИСТОЧНИКИ ИНФОРМАЦИИSOURCES OF INFORMATION

1. Современные технологии для трансформации бизнеса / URL: https:// www.oracle.com/ru/emerging-technologies/, дата обращения 02.07.2020.1. Modern technologies for business transformation / URL: https: // www.oracle.com/ru/emerging-technologies/, date of treatment 07/02/2020.

2. Премиум-возможности современной облачной аналитической платформы / URL: https://www.teradata.com, дата обращения 02.07.2020.2. Premium features of a modern cloud analytical platform / URL: https://www.teradata.com, date of treatment 07/02/2020.

3. IMB Power Systems: accelerated computing servers / URL: https://www.ibm.com/ it-infrastructure/power/accelerated-computing, дата обращения 02.07.2020.3. IMB Power Systems: accelerated computing servers / URL: https://www.ibm.com/ it-infrastructure / power / accelerated-computing, accessed 07/02/2020.

4. Carlson, R., Steen, В., Tillman, A. M., &

Figure 00000004
G. LCI data modelling and a database design./The International Journal of Life Cycle Assessment, 3(2), PP. 106-113.4. Carlson, R., Steen, B., Tillman, AM, &
Figure 00000004
G. LCI data modeling and a database design./The International Journal of Life Cycle Assessment, 3 (2), PP. 106-113.

5. Решения Azure/ URL: https://azure.microsoft.com/ru-ru/solutions/#solutions-by-industry/, дата обращения 02.07.2020.5. Azure solutions / URL: https://azure.microsoft.com/ru-ru/solutions/#solutions-by-industry/, date of treatment 07/02/2020.

6. Компании, которые работают с SAS / URL: https://www.sas.com/ru_ru/software/ how-to-buy/request-price-quote.html, дата обращения 02.07.2020.6. Companies that work with SAS / URL: https://www.sas.com/ru_ru/software/ how-to-buy / request-price-quote.html, date of treatment 07/02/2020.

7. Новые технологии предоставляют конкурентные преимущества/ URL: https://www.oracle.com/ru/emerging-technologies/, дата обращения 02.07.2020.7. New technologies provide competitive advantages / URL: https://www.oracle.com/ru/emerging-technologies/, date of treatment 07/02/2020.

8. Патент US №8914354 В2 от 16.12.2014 Cardinality and Selectivity Estimation Using Asingle Table JOIN Index/Au Grace, Korlapati Rama Krishna, Chen Haiyan8. US patent No. 8914354 B2 from 16.12.2014 Cardinality and Selectivity Estimation Using Asingle Table JOIN Index / Au Grace, Korlapati Rama Krishna, Chen Haiyan

9. Патент US №9665624 B2 от 18.12.2014 JOIN Operation Partitioining/ Gopi K. Attaluri, Vijayshankar Raman.9. US patent No. 9665624 B2 from 18.12.2014 JOIN Operation Partitioining / Gopi K. Attaluri, Vijayshankar Raman.

10. Патент US №8099409 B2 от 17.01.2012 System, Method, and Computer-readable Medium for Duplication Optimization for Parallel JOIN Operations on Similarly Large Skewed Tables/ Zhou Xin, Kostamaa Olli Pekka.10. US patent No. 8099409 B2 from 17.01.2012 System, Method, and Computer-readable Medium for Duplication Optimization for Parallel JOIN Operations on Similarly Large Skewed Tables / Zhou Xin, Kostamaa Olli Pekka.

Claims (1)

Способ параллельного выполнения операции JOIN при обработке больших структурированных высокоактивных данных, заключающийся в том, что в компьютерно-реализуемой системе манипулирования данными, использующей язык SQL, после получения хост-процессором обеих таблиц-операндов и условий отбора строк в операции производится распределение строк таблиц-операндов между множеством модулей обработки в форме таблиц-фрагментов с последующим параллельным выполнением операции SQL JOIN в модулях обработки над этими фрагментами таблиц-операндов с одновременным объединением результатов, отличающийся тем, что распределению строк таблиц-фрагментов между множеством модулей обработки предшествует осуществляемое хост-процессором формирование для каждой таблицы-операнда индексной таблицы, в которой каждая строка содержит значение ключа операции SQL JOIN и значение количества строк в данной таблице-операнде, соответствующее этому ключу, выполнение операции пересечения сформированных индексных таблиц с вычислением произведения частот использования ключей операции SQL JOIN в таблицах-операндах, упорядочивание полученной сводной таблицы метаданных по убыванию значений величины произведения частот использования ключей, отбор строк таблиц-операндов в таблицы-фрагменты осуществляется по значениям ключей, соответствующих строкам сводной таблицы метаданных, таким образом, что каждая пара таблиц-фрагментов в одном модуле обработки содержит только те строки таблиц-операндов, которые имеют одинаковое значение ключа.A method of parallel execution of the JOIN operation when processing large structured highly active data, which consists in the fact that in a computer-implemented data manipulation system using the SQL language, after the host processor receives both operand tables and the conditions for selecting rows in the operation, the rows of the operand tables are distributed between a set of processing modules in the form of tables-fragments with the subsequent parallel execution of the SQL JOIN operation in processing modules on these fragments of the tables-operands with the simultaneous merging of the results, characterized in that the distribution of rows of table-fragments between the set of processing modules is preceded by the formation carried out by the host processor for of each operand table of the index table, in which each row contains the value of the key of the SQL JOIN operation and the value of the number of rows in this operand table corresponding to this key, performing the operation of intersection of the formed index tables with calculation It is the product of the frequencies of using the keys of the SQL JOIN operation in the operand tables, ordering the resulting pivot metadata table in descending order of the values of the product of the key frequencies, selecting the rows of the operand tables into fragment tables by the values of the keys corresponding to the rows of the pivot metadata table, thus, that each pair of fragment tables in one processing unit contains only those rows of the operand tables that have the same key value.
RU2020124733A 2020-07-26 2020-07-26 Method for parallel execution of the join operation while processing large structured highly active data RU2755568C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2020124733A RU2755568C1 (en) 2020-07-26 2020-07-26 Method for parallel execution of the join operation while processing large structured highly active data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2020124733A RU2755568C1 (en) 2020-07-26 2020-07-26 Method for parallel execution of the join operation while processing large structured highly active data

Publications (1)

Publication Number Publication Date
RU2755568C1 true RU2755568C1 (en) 2021-09-17

Family

ID=77745935

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2020124733A RU2755568C1 (en) 2020-07-26 2020-07-26 Method for parallel execution of the join operation while processing large structured highly active data

Country Status (1)

Country Link
RU (1) RU2755568C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023080804A1 (en) * 2021-11-02 2023-05-11 Смоленская Общественная Организация Содействия Науке И Образованию "Региональный Союз Ученых" Method for parallel execution of a join operation when processing highly active structured big data

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997011432A1 (en) * 1995-09-21 1997-03-27 The Trustees Of Columbia University In The City Of New York An efficient join operation performed on large tables
US6957210B1 (en) * 2001-12-31 2005-10-18 Ncr Corporation Optimizing an exclusion join operation using a bitmap index structure
US8099409B2 (en) * 2008-09-03 2012-01-17 Teradata Us, Inc. System, method, and computer-readable medium for duplication optimization for parallel join operations on similarly large skewed tables
US8914354B2 (en) * 2009-07-28 2014-12-16 Teradata Us, Inc. Cardinality and selectivity estimation using a single table join index
US9665624B2 (en) * 2013-01-30 2017-05-30 International Business Machines Corporation Join operation partitioning
US20180004810A1 (en) * 2014-03-13 2018-01-04 Sybase, Inc. Splitting of a join operation to allow parallelization
WO2019018271A1 (en) * 2017-07-17 2019-01-24 Alteryx, Inc. Performing hash joins using parallel processing
US10268639B2 (en) * 2013-03-15 2019-04-23 Inpixon Joining large database tables
US10380112B2 (en) * 2017-07-31 2019-08-13 International Business Machines Corporation Joining two data tables on a join attribute

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997011432A1 (en) * 1995-09-21 1997-03-27 The Trustees Of Columbia University In The City Of New York An efficient join operation performed on large tables
US6957210B1 (en) * 2001-12-31 2005-10-18 Ncr Corporation Optimizing an exclusion join operation using a bitmap index structure
US8099409B2 (en) * 2008-09-03 2012-01-17 Teradata Us, Inc. System, method, and computer-readable medium for duplication optimization for parallel join operations on similarly large skewed tables
US8914354B2 (en) * 2009-07-28 2014-12-16 Teradata Us, Inc. Cardinality and selectivity estimation using a single table join index
US9665624B2 (en) * 2013-01-30 2017-05-30 International Business Machines Corporation Join operation partitioning
US10268639B2 (en) * 2013-03-15 2019-04-23 Inpixon Joining large database tables
US20180004810A1 (en) * 2014-03-13 2018-01-04 Sybase, Inc. Splitting of a join operation to allow parallelization
WO2019018271A1 (en) * 2017-07-17 2019-01-24 Alteryx, Inc. Performing hash joins using parallel processing
US10380112B2 (en) * 2017-07-31 2019-08-13 International Business Machines Corporation Joining two data tables on a join attribute

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023080804A1 (en) * 2021-11-02 2023-05-11 Смоленская Общественная Организация Содействия Науке И Образованию "Региональный Союз Ученых" Method for parallel execution of a join operation when processing highly active structured big data

Similar Documents

Publication Publication Date Title
US20180276250A1 (en) Distributed Image Search
US9317544B2 (en) Integrated fuzzy joins in database management systems
Chen et al. MapReduce skyline query processing with a new angular partitioning approach
US20130097139A1 (en) Programmable multi-filtering
WO2016134580A1 (en) Data query method and apparatus
US20180276264A1 (en) Index establishment method and device
US10977280B2 (en) Systems and methods for memory optimization interest-driven business intelligence systems
US9098550B2 (en) Systems and methods for performing data analysis for model proposals
AU2018282315B2 (en) Relation aware aggregation (RAA) on normalized datasets
Kamat et al. A session-based approach to fast-but-approximate interactive data cube exploration
US20150120697A1 (en) System and method for analysis of a database proxy
Cheng et al. Multi-Query Diversification in Microblogging Posts.
RU2755568C1 (en) Method for parallel execution of the join operation while processing large structured highly active data
Lakshmi et al. Query optimization using clustering and Genetic Algorithm for Distributed Databases
US10565286B2 (en) Constructing join histograms from histograms with Q-error guarantees
Xu et al. Efficient similarity join based on Earth mover’s Distance using Mapreduce
Liroz-Gistau et al. Dynamic workload-based partitioning algorithms for continuously growing databases
Guzun et al. A two-phase mapreduce algorithm for scalable preference queries over high-dimensional data
Wang et al. Turbo: Dynamic and decentralized global analytics via machine learning
Zhong et al. Correlation-aware object placement for multi-object operations
Yu et al. Materialized view selection based on adaptive genetic algorithm and its implementation with Apache hive
Rajith et al. JARS: join-aware distributed RDF storage
WO2023080804A1 (en) Method for parallel execution of a join operation when processing highly active structured big data
Likhyani et al. Label constrained shortest path estimation
Zaman et al. Secure k-objects selection for a keyword query based on MapReduce skyline algorithm