1

I am working with a very old MySQL database which uses Yes/No as flags and CA, US etc. for identifying countries rather than 1/0 and country ID.

These all have indexes.

Is this much of a hit on performance? There are a lot of records in this database.

Billy
  • 788
  • 1
  • 8
  • 17

1 Answers1

0

Using proper indices it will not make much of a difference when it comes to performance. However, the bigger problem is that it will make data management harder since a state code could change, states could potentially merge or be split etc.

Some good points are being made in this old question on the same topic:

Is there a REAL performance difference between INT and VARCHAR primary keys?

Community
  • 1
  • 1
purpleninja
  • 376
  • 3
  • 11
  • Thank you. We have some performance issues and wanted to eliminate this. – Billy Mar 07 '16 at 14:57
  • Checking for slow queries would be a good start if you think the database is the problem: http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html – purpleninja Mar 07 '16 at 15:36