'Offset pagination in MySQL return inconsistent results using ORDER BY Date
I have recently found that my pagination queries in MySQL are somehow broken and, after some research, I tend to believe it comes from the fact that I paginate my rows by a DATETIME field. My issue is that some rows are shown in multiple pages and some are not shown once in my pages.
My queries typically look like that: SELECT * FROM Table ORDER BY start ASC LIMIT 12 OFFSET 12. The start column is a DATETIME and is using an index.
As far as I understand, the issue might come from the fact that multiple rows (dozens) have the exact same start value. I would like to ask here if some of you already faced such a situation and hopefully know what to do to correct this behavior ?
Thanks in advance for your help !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
