Will using BigInt singed slow down my database considerably compared to a medium int. and if so how can I calculate the slow date rate of my database using it?
Will using BigInt singed slow down my database considerably compared to a medium int.
Share
Let me put it to you this way…
When you expand a row using
ALTER TABLE ... ROW_FORMAT-Fixedin MyISAM, a table will grow 80-100% but you get a 20-25% peformance boost. Why?The book MySQL Database Design and Tuning recommends using
ROW_FORMAT=FIXEDon pages 72,73. This will internally convert all VARCHAR fields to CHAR. It will make the MyISAM table larger, but executed SELECTs against it will be much faster. I can personally attest to this. I once had a table that was 1.9GB. I changed the format with ALTER TABLE tblname ROW_FORMAT=FIXED. The table ended up 3.7GB. The speed of the SELECTs against it was 20-25% faster without improving or changing anything else.This does not have to do with numbers. Yet, in theory (and I have tried this as well), using smaller integer formats would speed up database internal operations. Think of it. Smaller integers may save on byte alignment issues in tables, indexes, and even caching.
To trust what I just said, you have to try it out on a staging server using a copy of production data. Just convert the appropriate columns based on this:
The result ?
Give it a Try !!!
CAVEAT
I am not referring to the app code, only server-sde operation.