codimd icon indicating copy to clipboard operation
codimd copied to clipboard

Add index at revision table for improving system performance 🚀

Open yamashush opened this issue 1 year ago • 0 comments
trafficstars

The SQLs to select records from the revision table is a sequential scan. These SQLs use note id as a search key, but there is no index on the note id column.

I want to change to index scan to improve system performance 🚀 The records in the revision table will become huge during operation, so sequential scans should be avoided. This is especially because the following fetch processing is called frequently.

https://github.com/hackmdio/codimd/blob/d157fde6667185ab09125fa18317152eeef15fb4/app.js#L277

For your reference, the organization I belong to has already changed it. (https://github.com/kufu/hackmd/pull/19)

yamashush avatar Jan 14 '24 12:01 yamashush