From: G. Richardson Date: Mon, 25 Feb 2019 15:34:19 +0000 (+0100) Subject: Index auf inventory parts_id X-Git-Tag: release-3.5.6.1~525 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5018666cab35ac6246adb7a8622a9041c3b3a4fb;p=kivitendo-erp.git Index auf inventory parts_id um schneller die Bestände eines Artikels in diversen Lagern zu berechnen --- diff --git a/sql/Pg-upgrade2/inventory_parts_id_index.sql b/sql/Pg-upgrade2/inventory_parts_id_index.sql new file mode 100644 index 000000000..84ffec933 --- /dev/null +++ b/sql/Pg-upgrade2/inventory_parts_id_index.sql @@ -0,0 +1,12 @@ +-- @tag: inventory_parts_id_index +-- @description: Index auf inventory parts_id, um schneller die Bestände eines Artikels in diversen Lagern zu berechnen +-- @depends: release_3_5_4 + +-- increase speed of queries for inventory information on one part, e.g. + +-- SELECT parts_id, warehouse_id, bin_id, sum(qty) +-- FROM inventory +-- WHERE parts_id = 1234 +-- GROUP BY parts_id, bin_id, warehouse_id; + +CREATE INDEX inventory_parts_id_idx ON inventory (parts_id);