Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我很好奇 MySQL 如何在表上没有索引或约束的情况下进行内部记录排序。假设数据内容永远不会改变,相同的 SELECT 是否总是以相同的顺序返回记录,或者您可以期待打乱的顺序?
谢谢
如果您不创建索引,则“最后插入的将是最后显示的”如果您进行一些更新或删除并插入表中,则根本不正确。IE 如果您删除并插入一条记录,订单将开始混乱(如果您没有指定订单)。此外,索引不会始终为您提供完美的订单,使用 HUGE TABLES,有很多记录,您不能相信索引会自行保持订单(请记住索引也可能损坏),因此总是推荐使用order by从句
order by
你可以期待订单洗牌。 ORDER BY很关键。
ORDER BY
My website is used to get RSS news (for example). Users of website can format the output of results by using template syntax like mustache and can set time to receive email what hot news in a da