I have a MariaDB InnoDB table with several million rows, but with short, fixed-width rows consisting of numbers and timestamps only. We usually search, filter and sort the rows using any of the existing columns.
We want to add a column to store an associated "url" to each row. Ideally every row will have it's url. We know for a fact that we won't be sorting, searching and filtering by the url column. We don't mind truncating the URL to it's first 255 bytes, so we are going to give it the VARCHAR type. But of course that column's width would be variable. The whole record will become variable-width and the width of the original record will double in many cases.
We were considering the alternative of using a different, secondary table for storing the varchar. We could join them when querying the data, or even more efficiently -probably- just fetch the url's for the page we are showing.
Would this approach be advisable? Is there a better alternative that would also allow us to preserve performance?
Update: As user Bill Karwin noted in one comment below, InnoDB does not benefit from fixed width as much as MyISAM does, so the real issue here is about the size of the row and not so much about the fixed versus variable width discussion.