Convert command into a BULK load operation
First Claim
1. A method comprising:
- receiving a database command, the database command associated with a base table with at least one row to copy to a target table;
receiving an indication that use of a BULK insert mode is feasible for the database command, the feasibility determined based on one or more run-time statistics for at least one buffer indicating a threshold number of full row buffers;
based on the indication, converting from a non-bulk insert mode to the BULK insert mode by allocating resources including one or more extents, each extent comprising a block of pages, and one or more threads for index updating; and
based on determining that an insert mode for the database command has been converted from a non-bulk insert mode to the BULK insert mode;
reading a row from the base table;
building the row read from the base table into an allocated row buffer within a block of pages of an extent of the one or more extents; and
based on a determination that the allocated row buffer is full, inserting rows within the allocated row buffer into the target table in the BULK insert mode and updating at least one index in parallel with the inserting, the updating using at least one thread of the one or more threads.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for inserting rows into a target table can include receiving a database command, the database command associated with a base table with at least one row to copy to a target table; receiving an indication that use of a BULK insert mode is feasible for the database command; based on the indication, and determining that an insert mode for the database command has been converted from a non-bulk insert mode to the BULK insert mode: reading a row from the base table; building the row read from the base table into an allocated row buffer; inserting the row into the target table in the BULK insert mode; and if it is determined that the allocated row buffer is full, updating at least one index in parallel with the inserting.
-
Citations
20 Claims
-
1. A method comprising:
-
receiving a database command, the database command associated with a base table with at least one row to copy to a target table; receiving an indication that use of a BULK insert mode is feasible for the database command, the feasibility determined based on one or more run-time statistics for at least one buffer indicating a threshold number of full row buffers; based on the indication, converting from a non-bulk insert mode to the BULK insert mode by allocating resources including one or more extents, each extent comprising a block of pages, and one or more threads for index updating; and based on determining that an insert mode for the database command has been converted from a non-bulk insert mode to the BULK insert mode; reading a row from the base table; building the row read from the base table into an allocated row buffer within a block of pages of an extent of the one or more extents; and based on a determination that the allocated row buffer is full, inserting rows within the allocated row buffer into the target table in the BULK insert mode and updating at least one index in parallel with the inserting, the updating using at least one thread of the one or more threads. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system comprising:
-
one or more processors; and a non-transitory computer-readable medium coupled to the one or more processors, the computer-readable medium comprising one or more modules, which when executed by the one or more processors, configure the one or more processors to perform one or more operations, the one or more modules including; a command execution module configured to cause the one or more processors to; initiate execution of a database command, the database command associated with a base table with at least one row to copy to a target table; receive an indication that use of a BULK insert mode is feasible for the database command, the feasibility determined based on one or more run-time statistics for at least one buffer indicating a threshold number of full row buffers; a row buffer manager module configured to cause the one or more processors to, based on the indication, and a determination that an insert mode for the database command has been converted from a non-bulk insert mode to the BULK insert mode; read a row from the base table; and build the row read from the base table into an allocated row buffer within a block of pages of an extent of one or more extents; and an insert row module configured to cause the one or more processors to, based on the indication, convert from the non-bulk insert mode to the BULK insert mode by allocating resources including the one or more extents, each extent comprising a block of pages, and one or more threads for index updating, and based on a determination that the allocated row buffer is full; insert rows within the allocated row buffer into the target table in the BULK insert mode; and update at least one index in parallel with the inserting, the updating using at least one thread of the one or more threads. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A non-transitory computer-readable medium comprising instructions, which when executed by at least one processor, configure the at least one processor to perform operations comprising:
-
initiating execution of a database command, the database command associated with a base table with at least one row to copy to a target table; receiving an indication that use of a BULK insert mode is feasible for the database command, the feasibility determined based on one or more run-time statistics for at least one buffer indicating a threshold number of full row buffers; based on the indication, converting from a non-bulk insert mode to the BULK insert mode by allocating resources including one or more extents, each extent comprising a block of pages, and one or more threads for index updating; and based on determining that an insert mode for the database command has been converted from a non-bulk insert mode to the BULK insert mode; reading a row from the base table; building the row read from the base table into an allocated row buffer within a block of pages of an extent of the one or more extents; and based on a determination that the allocated row buffer is full, inserting rows within the allocated row buffer into the target table in the BULK insert mode and updating at least one index in parallel with the inserting, the updating using at least one thread of the one or more threads. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification