There are 1 million php inserts. what is the difference between 1 million inserts and inserts?

Source: Internet
Author: User
There are 1 million php inserts. what is the difference between 1 million inserts and inserts? 1-digits, from 1.

User A, randomly assigned 10,

User B, 8 random,

User c, random to 10000,

Three users, or N users, must be random numbers,

How to solve the problem.

Use PHP to operate. do not use mysql to operate. use mysql for query and storage.


Reply to discussion (solution)

I don't know what you mean?
If only data is inserted, the speed without indexes will be much higher than that with indexes.
If it is only a query, the indexing speed will be much higher than the non-indexing speed.

Are you inserting or querying?
I think you need to determine whether the Plug-In exists.
You need to add an index.

Do you want to use a database to randomly allocate a unique primary key id?

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.