Open drnextgis opened 1 year ago
The maintain_partitions can be used to make sure that all indexes match what is defined in the queryables table. Generally, you do not need to manually call this function as it will be called by triggers on the queryables table as well as on when running the check_partition function. When called by a trigger, the behavior will be to not remove any indexes that don't match the desired indexes as defined by queryables.
You can run by hand to remove any indexes using `SELECT maintain_partitions('items',TRUE);
BTREE indexes as of Postgres 15 (maybe it was 14, not sure off the top of my head) allow for deduplication of identical rows which means that an index on a casted floats to int can be much smaller/faster than the same index would be on a float. The smaller matters less about disk space, but more in that the entire index is more likely to stay in memory. This is, of course, at the cost of precision, but for fields where that precision may not be critical, it can be advantageous to index as ints.
@bitner, should we plan on adding anything about this to the docs? Maybe under the indexes section in docs/src/pgstac.md
?
I notice that in #210,
eo:cloud_cover
has been excluded from the list of queryables. Is there a function available to also remove the corresponding index from all partitions, or is this a manual task? Also I'm curious about the choice to initially use theto_int
property wrapper there instead ofto_float
. Are there any specific advantages to using it in this context?