How MySQL handles queries, because I want to generate and check GUID's

Status
This thread has been locked.

Paintball

⭐ Web & Java Developer ⭐
Supreme
Feedback score
5
Posts
45
Reactions
31
Resources
0
Hello everyone i was wondering if anyone could me with this.

Basically I want to scale my MySQL databases, and to prepare for large amounts of data in my databases (just 1 for now) I need to generate GUID's for rows instead of auto-increment numbers, and I want to know if there can be any collisions in MySQL. I want to know specifically if MySQL handles 1 query at a time, and not multiple at the same time. For example if I'm inserting a new row, I want to know if it's safe to generate a UUID in PHP and then do a
Code:
SELECT * FROM
query to my databases and if there are no rows, assign the new UUID to the newly inserted row, can there be any conflicts or issues here?

Thanks in advance
Paint


**UPDATE**
Queue:

Currently Trying queues. As the data will be spread across multiple databases I will be using a queue table to check the value before it is placed in.
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Dori

Full Stack Developer
Supreme
Feedback score
28
Posts
459
Reactions
198
Resources
0
If you are going to be working with big amounts of data. I would suggest researching about MongoDB. It generates a random id for every document you insert (an alphanumeric id ex. 01D6Y0HJ8M4GA7T17TK9KPEF0G). It is much faster handling multiple queries at once than SQL and the queries itself are also much faster when talking about big amounts of data.
You also insert JSON objects to MongoDB which makes it much easier to work with, as 90% of the development industry works with JSON anyways.
I use MongoDB for most of my projects and it never failed me.
Good Luck.
 

Paintball

⭐ Web & Java Developer ⭐
Supreme
Feedback score
5
Posts
45
Reactions
31
Resources
0
Thanks, I will do some research into MongoDB.

- Paint

still looking for an answer to my original query
 

Jay

regret nothing
Premium
Feedback score
13
Posts
532
Reactions
211
Resources
0
Status
This thread has been locked.
Top