On Monday, June 27, 2011 7:04:09 PM UTC-7, Jim D. wrote: So that caveat aside, I will try later to find a large data set I can run > the query on to get an idea of what kind of performance hit the check > entails. If anyone else has a large data set with two related tables, you > can try it out as well and report your results.
Okay, I just ran this on an InnoDB with 228k rows that's about 8.5MB in size ("REFERRING"), with a related table of 248 rows to join on ("REFERRED"), with no invalid records: SELECT REFERRING.`id`, REFERRING.`id_pointing_to_some_related_table ` FROM `some_table` as REFERRING LEFT JOIN `some_related_table` as REFERRED ON (REFERRING.`id_pointing_to_some_related_table` = REFERRED.`id`) WHERE REFERRING.`id_pointing_to_some_related_table ` IS NOT NULL AND REFERRED.`id` IS NULL I'm getting this consistently under 1 second, around 700 or 800 ms generally. Not great but not horrible. I didn't do any sophisticated profiling or setup for this or anything. I'm not sure what kind of performance we might think is acceptable, but for the dominant use cases of load data I think it's fine. My thinking at this point would be the performance is "good enough" for the scope of the current ticket, and that if better performance were required or desired, that could be facilitated under a separate ticket, assuming there was community demand for it. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/hynqngB0OHMJ. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.