开发者

Database structure, optimizing table with lots of rows

开发者 https://www.devze.com 2023-01-02 09:30 出处:网络
I have a table with a lot of rows. The structure is something like this: UserID | ItemID | Item Data...

I have a table with a lot of rows. The structure is something like this:

UserID | ItemID | Item Data...

Would I see any gains in query time if I separated this in开发者_开发百科to a table per user, or per smaller group of users?

Queries are always single user getting/modifying a selection of items.


Do not make multiple tables.

Tell us what you think "lots of rows" is.

Do you have any indexes or constraints on the table?

How is the data inserted, updated and deleted?

Typically, I would want a unique index on UserID, ItemID, but without knowing more about your environment, it's hard to say.

Also, please give us information on the database platform and the data types you have chosen.

0

精彩评论

暂无评论...
验证码 换一张
取 消