Index to allow querying the Biomes ObjectType table (and any other query that checks based on the uint8 static data)
ObjectType: {
schema: { entityId: "bytes32", objectTypeId: "uint8" },
key: ["entityId"],
},
psql -d dozer -c "CREATE INDEX records_first_byte ON records(address, table_id, b2n(sdec(static_data, 0, 1))) INCLUDE (key) WHERE NOT expired AND NOT deleted;"
→ Size of this index is about 7.5GB
Index to allow querying ranges from the Biomes Position table (and any other query that checks based on three int32 values)
Position: {
schema: { entityId: "bytes32", x: "int16", y: "int16", z: "int16" },
key: ["entityId"],
},
psql -d dozer -c "CREATE INDEX records_static_int16_xyz ON records(address, table_id, b2sn(sdec(static_data, 0, 2)), b2sn(sdec(static_data, 2, 2)), b2sn(sdec(static_data, 4, 2))) INCLUDE (key) WHERE NOT expired AND NOT deleted;"
→ Size of this index is about 7.8GB with 8.5 million relevant records
Index to allow querying the Biomes
ObjectTypetable (and any other query that checks based on theuint8static data)→ Size of this index is about 7.5GB
Index to allow querying ranges from the Biomes
Positiontable (and any other query that checks based on threeint32values)→ Size of this index is about 7.8GB with 8.5 million relevant records