Tuesday, November 26, 2013

onetoone field and memory issue

Hello everybody,

I have a memory issue and I'm looking for some suggestions.

I have the following model

class Entity(models.Model):
   
    item= models.OneToOneField(Bigdata, blank = True,null=True)


Bigdata is a table with 150.000+ items
In the admin interface, when I try to add a new Entity item, I have a big memory increment, I think because django load all the Bigdata table in the dropdown list of the fied item (I'm pretty sure, because if the table Bigdata is small I have no problem).
So the problem seems the filling of the Bigdata dropdown list, that loads all the items at once.

How can I deal with this situation? Pagination of Bigdata? Autocomplete instead dropdown list? Any feedback will be very appreciated.
thank you  everyone!

Carlo
  


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83b025d3-1ce1-4d9b-964f-1caa173d2132%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment