What does it mean to check about index selectivity? Sorry, my knowledge of databases is mostly as a user. But I am learning a lot this week.
-Tim On Fri, Feb 19, 2010 at 1:39 AM, Javier Guerra <jav...@guerrag.com> wrote: > On Fri, Feb 19, 2010 at 2:31 AM, Timothy Kinney > <timothyjkin...@gmail.com> wrote: > > is there a way to store a list variable in a model as a field (without > > creating another table)? > > There's no 'list' field type in SQL. There's a 'set' in MySQL; but i > think it's not standard, so not supported in Django. but for small > sets like these, i've used a simple char field, and a couple of model > functions that translate between a python list or set, and the > comma-separated string stored in the DB. > > note that if you do that, you won't be able to use SQL indexing to > help with queries on that set. in your case, it would mean that you > can't (quickly) get all the rooms with an 'east' exit. > > if you need such queries, better use another (small) table for exists, > and then be sure to check about index selectivity, or it would be hell > to optimize... > > -- > Javier > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.