开发者

Database structure, optimizing table with lots of rows

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜