SQL queries in a dataframe
That will not speedup your code, but there are some code improvements:


follow naming conventions getAttribute -> get_attribute https://visualgit.readthedocs.io/en/latest/pages/naming_convention.html
You can create set using set literal my_set = {1, 2, 3}
You can compile tableReg = re.compile(r"^.+?(?&lt;=[.])") once