I have realised that cqrlog is not showing all records in the database.
The records shown by a SQL query are, by date and id_cqrlog_main:
The log is only showing qso's in the date range from today back to 2019-05-03.
Records with the id's in the range 124-769 are not shown.
id_cqrlog_main is unique so I'm surprised at the problem. I have rebuilt index main_index ON cqrlog_main but this made no difference.
I have imported the ADIF backup file to a new log but this also made no difference.
Any advice on how to resolve this problem?