paulfitz / daff

align and compare tables
https://paulfitz.github.io/daff
MIT License
789 stars 67 forks source link

make selection of tables and keys more flexible during sql comparison #128

Closed paulfitz closed 5 years ago

paulfitz commented 5 years ago

Now the --table flag can be --table name1:name2 to allow a table called name1 to be compared with a table called name2.

As a side affect, you can now compare tables within a single database as follows:

 daff --table name1:name2 db.sqlite db.sqlite

The --id flag was until now not respected during sql comparison. Now it is. This is particularly useful for comparing tables that don't have a primary key set. However, comparisons will be slower using --id since the database will end up recreating indexes multiple times rather than just once.

The SQL queries were tweaked a bit to work better without an index, so that million row comparisons continue to take seconds. Still, do add an index, you'll be happier.