The interview questions and answers of Fortune 500 companies prompt the Interview Questions and Answers of Fortune 500 companies
Source: Computer World Network
Responsible editor: lujiezheng
[04-5-27] by Blair Watson (US)
Difficulties and
Originally I was to do C #, because the unit reason to do PHP. have been in their own groping, there are problems Baidu, a variety of groups to solve their own problems. The recent occupation into the burnout period, also happens to be more idle.
Many of you know that you can use the rand () function to query data at random in mysql, but the rand () function can use hundreds of thousands of data records directly, if tens of thousands of data entries occur, let me introduce you to rand ()
For example, there is a requirement, through the SQL statement, to return a random integer of 5 to 5. If this one is in PHP, it is very simple and straightforwardPrint rand ( -5,5);?>In MySQL, the RAND function can have only one parameter. Excerpt
In mysql, the RAND () random query record efficiency problem and solution share bitsCN.com recently, due to the need to roughly study the MYSQL Random extraction implementation method. For example, to randomly extract a record FROM the tablename
Efficiency has always been a problem during our development, especially for a lot of large data operations. Today we have a chance to query data randomly. At first we may think of the simplest orderbyrand () but the efficiency is not
Recently, we have studied the implementation of MYSQL random extraction. For example, to randomly extract a record FROM the tablename table, the general syntax is: SELECT * FROM tablename order by rand () LIMIT 1.
There are two ways to achieve the
In our development of the efficiency has always been a problem, especially for a lot of large data volume operation, today we ran into a random query data, at first we might think of the simplest order by RAND () to operate but the efficiency is not
Recently, because of the need to study the MySQL random extraction implementation method. For example, to randomly extract a record from the TableName table, the general wording would be: SELECT * from TableName ORDER by RAND () LIMIT 1.
There are
Efficiency issues and solutions for random query of RAND () in mysql
Efficiency has always been a problem during our development, especially for a lot of large data operations. Today we have a random query of data, at the beginning, we may think of
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.