Comment

Comment by sgarland

Aside from these (most of which have reasonably sane defaults with RDS / Aurora), the biggest thing you can do to help the existing RAM you have is to stop making stupid indexing choices.

You probably don’t need (or want) an index on every column.

You shouldn’t index a UUIDv4 column if you can ever help it (and by extension, you shouldn’t use them as a PK).

Finally, you almost certainly need to REINDEX what you have periodically. I’ve seen indices shrink by 400%, giving back GB of RAM. You want a quick win for speed with zero cost? Gain back enough RAM to have your entire working set cached.

parent sgarland 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton