Distinct records

Options

Hey everyone one, hope you’re doing well.
I have an issue. I have a variation table linked to a product table via a product_id field. I wanted to query all variations, paginate and sort them by the product name so I joined the product table to be able to do so. I then noticed that I had some variations repeating within two pages and so making another ones not appearing in the list. I was not able to explain why. I decided to enable the “distinct records” just to see what happens and the issue was kind of solved. Disabled et automatic option of distinct were causing the same elements to be present on different pages.
So is there a clear explanation of what that setting is for ? And why are elements repeated within pages of pagination? Thank you.

Answers