Shovel version af07 introduces tableindex field, which enhances query performance.
However, there's a limitation in the current implementation where specifying only column names as parameters can cause silent index creation failures.
For example, when defining two tables with similar index configurations:
{
"name": "eth_events_univ2_pair_created",
"columns": [
{ "name": "block_num", "type": "numeric" },
{ "name": "transaction_hash", "type": "bytea" },
// ... other columns
],
"index": [
["block_num DESC"],
["transaction_hash"],
// ... other indexes
]
}
{
"name": "eth_events_univ2_mint",
"columns": [
{ "name": "block_num", "type": "numeric" },
{ "name": "transaction_hash", "type": "bytea" },
// ... other columns
],
"index": [
["block_num DESC"],
["transaction_hash"],
["pair"]
]
}
Shovel attempts to create indexes with identical names (shovel_block_num and shovel_transaction_hash) across both tables, resulting in index creation failures in one of the table
Shovel version
af07introduces tableindexfield, which enhances query performance.However, there's a limitation in the current implementation where specifying only column names as parameters can cause silent index creation failures.
For example, when defining two tables with similar index configurations:
{ "name": "eth_events_univ2_pair_created", "columns": [ { "name": "block_num", "type": "numeric" }, { "name": "transaction_hash", "type": "bytea" }, // ... other columns ], "index": [ ["block_num DESC"], ["transaction_hash"], // ... other indexes ] } { "name": "eth_events_univ2_mint", "columns": [ { "name": "block_num", "type": "numeric" }, { "name": "transaction_hash", "type": "bytea" }, // ... other columns ], "index": [ ["block_num DESC"], ["transaction_hash"], ["pair"] ] }Shovel attempts to create indexes with identical names (
shovel_block_numandshovel_transaction_hash) across both tables, resulting in index creation failures in one of the table