jazzband / django-silk

Silky smooth profiling for Django
MIT License
4.45k stars 335 forks source link

Enhance gathering of metadata on SQL queries #13

Open mtford90 opened 10 years ago

mtford90 commented 10 years ago

Atm the way in which metadata such as num. joins, tables involved for sql queries is gathered is rudimentary. Should be possible to use something like https://code.google.com/p/python-sqlparse/ to parse the SQL and pull out tables etc via the tokens generated

SebCorbin commented 1 year ago

Could be taken from https://github.com/andialbrecht/sqlparse/blob/master/examples/extract_table_names.py or https://stackoverflow.com/a/69684339/848811