Using pypyodbc in place of librdf results in a significant speedup for tree retrieval - fetching the fish supertree was about 15x faster when I tested.