speedup library well diff in migration using raw sql