lemmy Server Performance backwards from PostgreSQL data to Rust code and TRIGGER FUNCTION logic, listed observations
lemmy Server Performance backwards from PostgreSQL data to Rust code and TRIGGER FUNCTION logic, listed observations
- post primary key has gaps in it, the sequence is being used for transactions that are later canceled or some kind of orphan posts? This is observable from incoming federation posts from other instances.
- comment_aggregates has a unique id column from comment table id column. There is a one to one row relationship. Can the logic be reworked to eliminate the extra column and related INDEX overhead?
- Related to 2... Same issue probably exist in post_aggregates table and others that have one to one join relationships.