最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

如何快速按列之一对MySQL表重新排序?

SEO心得admin50浏览0评论
本文介绍了如何快速按列之一对MySQL表重新排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

最有效的SQL查询将采用现有的MySQL表并按其中一列对其进行重新排序,这是最有效的SQL查询?不是选择,而是整个表格应按一列排序.我想以某种方式使用临时表,但是最好的方法是什么?

What are the most efficient SQL queries that would take an existing MySQL table and re-sort it by one of the columns? Not a selection, but the whole table should be sorted by one column. Somehow using a temporary table, I guess, but what's the best way?

推荐答案

表只是其固有排序的数据.从该表中获取数据的查询可以排序,但表本身不可以.

the table is just the data its not inherently sorted. a query obtaining the data from that table may be sorted, but the table itself is not.

在要对查询进行排序的列上具有索引将有助于提供最佳的查询时间.

Having indexes on the columns you want your queries to sort on will help give the best query time.

发布评论

评论列表(0)

  1. 暂无评论