PostgreSQL query slow when where clause is not on an ID
I'm using a postgresql (15.5) database with the following logic: We have "meters" who measure electrical consumption. We have "computer meters" who are calculation of the measurements of different meters. For exemple "computedMeterA" = "meterA" + "meterB" I have classical…