The ultimate MySQL legacy database nightmare

前端 未结 4 1992
面向向阳花
面向向阳花 2021-02-14 08:22

Table1: Everything including the kitchen sink. Dates in the wrong format (year last so you cannot sort on that column), Numbers stored as VARCHAR, complete addresses in the \'st

4条回答
  •  别跟我提以往
    2021-02-14 09:05

    you might be able to use maatkit's mk-table-sync tool to synchronise a staging database (your database is only very small, after all). This will "duplicate the mess"

    You could then write something that, after the sync, does various queries to generate a set of more sane tables that you can then report off.

    I imagine that this could be done on a daily basis without a performance problem.

    Doing it all off a different server will avoid impacting the original database.

    The only problem I can see is if some of the tables don't have primary keys.

提交回复
热议问题