On Tue, Oct 16, 2012 at 10:47 PM, Karl Denninger <karl(at)denninger(dot)net> wrote:
> Put an index on time_stamp (I assume there is one on id_signal already)
Well the optimal index for this particular query would include both columns:
(id_signal, time_stamp) -- in this order.
Additionally, if you want to take advantage of the index-only scans
feature, add the SELECTed column too:
(id_signal, time_stamp, var_value)
Regards,
Marti