Re: Large number of tables slow insert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That's not a bad idea, at least for historical data.
But actually one of the most common thing in sensor network monitoring is last readings monitoring.
With indexes what I can do is : SELECT * FROM measures_xx ORDER BY timestamp DESC LIMIT 1 => And I got the very last reading in a blink (one page reading only).
It shall be complicated that way... it can only be done by a mass update on a table each time I receive a packet...
Also it's very important to have last 24h readings aggregate by hour or minutes (to plot a graph).
So I can't go that way.... I think I must keep the timestamp index where it is but I should probably get rid of the others.

Thank you again for your help people

Regards

Loic Petit

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux