CauseThe data is sorted in three dimensions, with the result that the results of two of the orderBy(desc("col")) dimensions are returned correctly, and the result in the other dimension appears to be the result of a large row, the result of the
Note: Use BTREE to comindex ASC/DESC of each field to optimize order by query efficiency. btreeascThe tbl_direct_pos_201506 table has 1.9 million data, DDL:
Create table 'tbl _ direct_pos_201506 '('acq _ ins_code' char (13) not null default
ORDER BY descending desc, ascending ASC by age descending
Select *from Student ORDER BY age DESCAscending by age
Select *from Student ORDER BY age ASCRank function rank () in descending order of use age, if the sort field is the same, rank
Note: Use the BTREE compound to index the ASC/DESC of each field to optimize the orderby query efficiency.The tbl_direct_pos_201506 table has 1.9 million data, DDL:
Create table 'tbl _ direct_pos_201506 '('acq _ ins_code' char (13) not null default '
SELECT * FROM table where yz= ' 1 ' ORDER BY btcount Desc This writes output is incorrect,
Btcount This field is very short, generally =0 or = 1, maximum no more than =8
When the amount of data is large, you cannot press the Btcount value of
Over cannot be used alone, with analytic functions: Rank (), Dense_rank (), Row_number (), and so on.Its parameters: Over (partition by columnname1 ORDER by Columnname2)Meaning: Group by the field specified by Columname1, or by the value of field
SORT key [by mode] [LIMIT offset count] [get mode [get pattern ...]] [ASC | DESC] [ALPHA] [STORE destination]
Returns or saves the sorted elements in the given list, collection, and ordered collection key.
Sorting defaults to numbers as objects,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.