Skip to content

Method insert_list

Maruf Çetin edited this page Sep 1, 2026 · 2 revisions

Method: insert_list()

Turkce Dokumantasyon | English Documentation

Category: Core CRUD Methods
Submodule: AmberDB
Entry Type: High-Throughput Batch Ingestion


1. Definition and Overview

insert_list() inserts multiple structured records in a high-performance, single-pass batch ingestion pipeline.

Instead of opening, locking, updating indexes, and closing physical database handles per individual record, insert_list():

  1. Acquires an exclusive table write lock once.
  2. Writes all record payloads into .db in a single streaming pass.
  3. Performs single-pass index merging for all secondary indexes (.inx, .src, .fld, .fac, .srt).
  4. Achieves 50x to 100x higher ingestion throughput for bulk data migrations and ETL jobs.

2. Syntax and Signature

# Ingest batch: Pass the list of record array references directly:
my $status_hash = $adb->insert_list($table_id, @bulk_records);

3. Practical Code Example

my @bulk_products = (
    [ 0, "Mechanical Keyboard", "Hardware", 129.99, 50 ],
    [ 0, "4K Gaming Monitor", "Hardware", 499.00, 20 ],
    [ 0, "USB-C Docking Hub", "Accessories", 79.50, 100 ],
);

$adb->insert_list("catalog_product", @bulk_products);

4. See Also

AmberDB Encyclopedia

Home · A-Z Index


Getting Started & Guides


Core Concepts


Core CRUD Methods


Query, Search & Facets


Transactions & Locks


Cache, Buffer & Low-Level


Locale & Helpers


Maintenance & Tools


Configuration Flags


File Formats


Language

Clone this wiki locally