Re: Large number of tables slow insert - Mailing list pgsql-performance

From Loic Petit
Subject Re: Large number of tables slow insert
Date
Msg-id 1775c5ea0808241902u66416c36l935b6df812164678@mail.gmail.com
Whole thread Raw
In response to Large number of tables slow insert  ("Loic Petit" <tls.wydd@free.fr>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Identifying the nature of blocking I/O
Next
From: Alvaro Herrera
Date:
Subject: Re: Identifying the nature of blocking I/O