INDEX on idx_lkregionplaylistId


I was encountering very slow performance and errors when trying to add layouts every minute via the API. Also, when trying to delete 500 layouts at a time, it was taking at least 10 seconds per layout. I am running the CMS on a C4large in AWS, so it is not a lack of resources as I was seeing the same performance as when I ran on a t2.small.

One of my DBAs suggested adding an INDEX and after doing so, the performance on deleting is incredible. I can delete 500 layouts in about 20-30 seconds. I am also no longer seeing errors when trying to add layouts via the API.

Here in the SQL statement to add the index (remove quotes).

“ALTER TABLE lkregionplaylist ADD INDEX idx_lkregionplaylist_playlistId (playlistId);”

Just thought I would drop this here as a recommendation to add in the upgrade scripts to the next version. Sorry if I created this ticket in the wrong section.

Best regards,

Thanks @Nathan_Rowe. I’ve moved it to the dev category so @dan will see it (with luck!)

1 Like

Thanks Nathan - i see no reason why we couldn’t add this index.

1 Like