Re: Large number of tables slow insert

From: "Loic Petit" <tls(dot)wydd(at)free(dot)fr>
To: scott(at)richrelevance(dot)com
Cc: peter(dot)schuller(at)infidyne(dot)com, pgsql-performance(at)postgresql(dot)org, hhall1001(at)reedyriver(dot)com, dforums(at)vieonet(dot)com, max(at)nts(dot)biz(dot)ua
Subject: Re: Large number of tables slow insert
Date: 2008-08-25 02:02:02
Message-ID: 1775c5ea0808241902u66416c36l935b6df812164678@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2008-08-25 02:16:09 Re: Identifying the nature of blocking I/O
Previous Message Tom Lane 2008-08-25 01:49:51 Re: Identifying the nature of blocking I/O