Search Postgresql Archives

Re: Using Postgres to store high volume streams of sensor readings

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

 



>     If you watch the speed, you'll see that the insert
> speed is the
> same, but the scan speed is worse (from 32k  to 200).

As I said, I don't know a lot about these things.
But I would like someone to comment on this (so that maybe I will know something!):

1) I thought the poor insert performance was due to a "locality of access" in the index creation, hence I thought that since the timestamp is always increasing putting it as first column in the index should give a better insert speed, but it didn't: why????

2) I thought that given a query like:

select * from taba where clientid=2 and sensor=4 and timestamp between 'start_t' and 'end_t'

there shouldn't be a huge difference in speed between an index defined as (timestamp, clientid, sensorid) and another one defined as (clientid, sensor, timestamp) but I was VERY wrong: it's 1000 times worst. How is it possible???

It's obvious I don't know how multicolumn indexes work...
Can someone explain?




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux