Old implemetation involved 2 sql queries for every party_type, one for address and one for contact. This was timing out if the party_type size was too large. New implementation involves 3 queries only. Stats: no_of_records | party_type | old_time | new_time --------------+------------+----------+--------- 27000 | Customer | 209 secs | 1.5 sec |
||
|---|---|---|
| .. | ||
| addresses_and_contacts | ||
| __init__.py | ||