> Den 13/08/2015 kl. 04.09 skrev [email protected]:
> 
> I'll run a test with the dict vs list+position counter. I know I saw a speed 
> improvement but I can't remember if that was the only thing I changed. 
> 
> I'd have to change a lot of code if I change the DB scheme so I'm not wanting 
> to create an intermediate table. I'm going to go down the SQL path.

The intermediate model doesn't change the DB schema in your case. A 
models.ManyToManyField already implicitly creates a table in the DB to hold the 
m2m relation. The intermediate model just makes this explicit.

The only thing this changes in your code is that you can't do 
"my_datapoint.sensors.add(my_sensor)" anymore. You need to always create (and 
delete) a DatapointSensorRel explicitly.

Erik

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/ABFA88FA-3D1F-42F8-A634-9E04C0C6DCD3%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to