0

I made a huge jump from MySQL 5.7 to MySQL 8 NDB. and it seems to me that in the earlier version when I queried a view I got answers more deterministic than now. Seems like it was ordered by something and now it does not.

It is not a huge problem but is my theory somewhat correct?

Thanks

4
  • yes it does, thanks
    – Rait
    Commented Oct 27, 2021 at 12:52
  • I'm curious. What was the reason for switching to NDB?
    – Rick James
    Commented Oct 28, 2021 at 18:12
  • for HA. We can not let any downtime for this database and all the data must be the latest possible at all times
    – Rait
    Commented Nov 3, 2021 at 12:48
  • Which mode of "eventually consistent" are you using?
    – Rick James
    Commented Nov 3, 2021 at 17:34

1 Answer 1

1

If you were lucky enough to get rows in "some order" consistently before, then you were just that ... Lucky.

The rows in Relational Database Tables have no deterministic order.
The only way to guarantee the order of what you get back from a query (or a View, which is just a "Query with a Name") is to use the "Order by" Clause.

Not the answer you're looking for? Browse other questions tagged or ask your own question.