Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit e065d20

Browse files
committed
Improve indices
1 parent 5b0369a commit e065d20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/index.create.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ CREATE INDEX "index_domain_transactions" ON transactions USING BTREE ("domain");
2424
CREATE INDEX "index_app_transactions" ON transactions USING BTREE ("app");
2525
CREATE INDEX "index_App-Name_transactions" ON transactions USING BTREE ("App-Name");
2626
27-
CREATE INDEX "tags_name" ON tags USING BTREE ("name");
28-
CREATE INDEX "tags_value" ON tags USING BTREE ("value");
29-
CREATE INDEX "tags_name_value" ON tags USING BTREE ("name", "value");
30-
CREATE INDEX "tags_tx_id_name" ON tags USING BTREE ("tx_id", "name");
27+
CREATE INDEX "tags_name" ON tags USING BTREE ("name") WHERE LENGTH("name") < 64;
28+
CREATE INDEX "tags_value" ON tags USING BTREE ("value") WHERE LENGTH("value") < 64;
29+
CREATE INDEX "tags_name_value" ON tags USING BTREE ("name", "value") WHERE LENGTH("name") < 64 AND LENGTH("value") < 64;
30+
CREATE INDEX "tags_tx_id_name" ON tags USING BTREE ("tx_id", "name") WHERE LENGTH("name") < 64;
3131
3232
EOF
3333

0 commit comments

Comments
 (0)