List:General Discussion« Previous MessageNext Message »
From:Nicolas Rannou Date:May 14 2012 9:05pm
Subject:Performance question
View as plain text  
Hi all,

We are currently designing a database for our application (python/mysql)
and we have some performance concern:

We would have "users" and "images".
"users" can view some "images".
"images" can be viewed by several "users".
(n to m mapping)

Which would be most efficient practice (regarding speed)?
We want to figure the most efficient way to get the images that a user see?
We want to handle 10 000 users and 100 000 images.

*1*  to create 3 tables:*

user - info about a user
images - info about an image
user_image_mapping
 -> one row per association:
 user 1 -> image 22
 user 1 -> image 8888
 user 2 -> image 567
 user 3 -> image 888
 user 3 -> image 44453

*2* to create 2 tables*

user - info about a user
 -> a field would contain a list which represents the ids of the images
the user can look at?
images - info about an image

Any suggestion would be greatly appreciated,

Best,
Nicolas

Thread
Performance questionNicolas Rannou14 May
  • Re: Performance questionReindl Harald14 May