0

I have tested Amazon Redshift as a cache. So I save data by a key. But with the time the cache becomes slower and slower. Once I do a VACCUM on the database it get backs to the speed. But should i run VACCUM continuously in the database ?. Or is there a better way of using redshift tables for continuous reads, writes and deletes.

2

I would not recommend using redshift as a cache. Have you considered Redis?

Redshift saves all data to disk in 1MB blocks, in an order established by your sortkey, and distributed between nodes based on your distkey. When ever you create, update, delete you are appending data to the last blocks of the database. These blocks that hold all the new changes are not sorted until you vaccume the database.

Hence, when you use redshift as a cache you are very quickly fragmenting your data, making your queries slow.

0

Certainly a BIG NO for using redshift as cache.

Unless, by cache you meant storing pre-computed aggregates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.