To give cost-based optimizer an idea of table’s cardinality it is recommended to issue queries like this:
CREATE STATISTICS offers_stats ON id FROM offers;
Documentation states that “The cost-based optimizer will not support automated use of statistics during this time period.” Does it mean that I need to periodically issue create statistics statements to update statistics?
I’m asking because if I issue create statistics … queries BEFORE I load my data, optimizer will not use statistics after data is loaded. As the result some joins are very slow.