forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Sync Query Problem?
- This topic is empty.
August 23, 2016 at 7:59 am #13555
(Hope I’m posting this in the right place – novice forum user!)
One table in my database tracks visits to a website – the total records count is now about 80million.
I run a daily query for the synchronisation, so that (hopefully) only the newest records are added – so
1) I only look at the id column (not all columns) in the ‘columns to compare’ and
2) The ‘SQL Where’ column is id > 79,900,000 (for example – I change this value regularly)
However, it takes FOREVER to run – it looks like it is scanning all records instead of only those where id>79,900,000.
Am I doing this correctly?
I there a better way of doing what I want – some way of only adding new records? I’m not bothered about the old data, as it won’t have changed.
Any help much appreciated.
August 23, 2016 at 12:32 pm #35759Sibin A SModerator
Can you please tell the total number of columns in the table that you have been trying to sync. Also tell us the SQLyog version and MySQL server version.
August 23, 2016 at 12:42 pm #35760
There are 79268055 records in the source and 79109275 in the destination.
EDIT – Sorry, misread your post; there are only 10 columns in the table.
(I am thinking I should dump the oldest records and just use that last 2 years!)
August 23, 2016 at 2:43 pm #35761Sibin A SModerator
We will try reproducing this with similar number of rows. Also you can dump the oldest records if they aren’t required for you as it also decreases the load on the server as well.
August 23, 2016 at 3:30 pm #35762
Thanks for investigating, Sibin.
- You must be logged in to reply to this topic.