Skip to main content
edited tags
Link
added 58 characters in body
Source Link
Saeed Neamati
  • 1.5k
  • 3
  • 20
  • 35

I'm creating a system that is not entirely microservices, but it's getting close to microservices and each module has its own database.

And based on what I have seen in many online services (Azure, AWS, Google Cloud, etc.) I have used UUID (or GUID) for my identifications.

This means that in the Orders database, I have CustomerUuid column. So, if I want to query a customer's orders, I should use where CustomerUuid = 'uuid_valu'.

To boost reading performance for all UUID I have this plan to put an index on every UUID column.

What negative impacts this decision might have? What are the cons for this strategy?

Update

Datebase = MariaDB
Version = 10.10.2

I'm creating a system that is not entirely microservices, but it's getting close to microservices and each module has its own database.

And based on what I have seen in many online services (Azure, AWS, Google Cloud, etc.) I have used UUID (or GUID) for my identifications.

This means that in the Orders database, I have CustomerUuid column. So, if I want to query a customer's orders, I should use where CustomerUuid = 'uuid_valu'.

To boost reading performance for all UUID I have this plan to put an index on every UUID column.

What negative impacts this decision might have? What are the cons for this strategy?

I'm creating a system that is not entirely microservices, but it's getting close to microservices and each module has its own database.

And based on what I have seen in many online services (Azure, AWS, Google Cloud, etc.) I have used UUID (or GUID) for my identifications.

This means that in the Orders database, I have CustomerUuid column. So, if I want to query a customer's orders, I should use where CustomerUuid = 'uuid_valu'.

To boost reading performance for all UUID I have this plan to put an index on every UUID column.

What negative impacts this decision might have? What are the cons for this strategy?

Update

Datebase = MariaDB
Version = 10.10.2

Source Link
Saeed Neamati
  • 1.5k
  • 3
  • 20
  • 35

What cons should I consider if I put index on every UUID column in my database

I'm creating a system that is not entirely microservices, but it's getting close to microservices and each module has its own database.

And based on what I have seen in many online services (Azure, AWS, Google Cloud, etc.) I have used UUID (or GUID) for my identifications.

This means that in the Orders database, I have CustomerUuid column. So, if I want to query a customer's orders, I should use where CustomerUuid = 'uuid_valu'.

To boost reading performance for all UUID I have this plan to put an index on every UUID column.

What negative impacts this decision might have? What are the cons for this strategy?