Partitioning Postgres tables by timestamp based UUIDs
elixirforum.com
elixirforum.com
I don't have information on how team investigated the whole problem. What table looks like? What indexes exactly? Was there any explain analyzing? 28 millions are not as many as it seems. We have similar sized table but when indexed properly, query is always quick
They also say "We had a very large table (28 million) rows that we were getting timeouts querying on anything other than the primary key."
Which implies that indexing did work if that was primary key. How could other indexes fail? They should work with similar performance. Doesn't that imply they must've done something wrong or there was some sort of bug somewhere? Or were the column in some fashion I can't think of?
And if the issue was with the queries per second, it would feel to me like it would still be less disruptive to just have some sort of replication going on for reads.
And partitioning really makes sense to me only if you are going to have it on multiple boxes, because otherwise I don't think there really should be many performance gains compared to just indexing?
I'm not seeing if/how they put it on multiple boxes?
I wonder at what point it makes more sense to adopt UUID v7 instead of ULID, but I guess that's a relatively irrelevant point.
https://gist.github.com/kjmph/5bd772b2c2df145aa645b837da7eca...