2011/8/29 Tim Lyons <firstname.lastname@example.org>
On 23 Aug 2011, at 21:29, Benny Malengier wrote:
you can delete the table and recreate it with the function as used in the tool with that name. That tool is a good way to test your code.
Could someone please explain the difference between Tools -> Family Tree Repair -> Rebuild Reference Maps and Rebuild Secondary Indices.
I understand that the first calls write.py reindex_reference_map and the second calls rebuild_secondary. I can see that reindex_reference_map rebuilds the reference maps by going through each primary object, and calling update_reference_map, but what exactly does rebuild_secondary do?
Without looking at the code, secondary tables are index tables of bsddb which bsddb can construct automatically, eg our surname table for sorting.
Also, in write.py I have had to call self.__connect_secondary() and self.__open_undodb() before doing the gramps_upgrade_16. Would I have to do that if I used the reindex_reference_map function?
Large updates are better without the secondary tables connected, as it slows down the upgrade. Then, when finished, you connect them or have bsddb rebuild them.
I would have to dive into the code to help more.