We are designing a database for a multi tenant application that will be per tenant based. This tenant is potentially 1000 or more.
We have samples tables called:
orders
orderitems
We are thinking to do partition based on tenantid so it can ran faster query within the tenant.
CREATE TABLE orders ( ... ) PARTITION BY HASH(tenantid) PARTITIONS ?;
Is that the best option to do this? How about the number of partition ... partition 1000?
I am appreciated your input.
Rules of thumb:
PARTITION BY HASH
provides no performance benefit.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.