Samara Trilling

Results 7 comments of Samara Trilling

Mostly a find and replace situation here. Tests/linter/type checker will complain if these are out of whack or improperly done.

Ooh, this does sound useful! Great opportunity to use `EXPLAIN ANALYZE` on the ddo query.

My timing of the same query: ``` dcra python manage.py shell -c "import timeit; from data_driven_onboarding.schema import *; print(timeit.timeit(lambda: run_ddo_sql_query('3012380016'), number=1))" Creating tenants2_app_run ... done Connection to database established. This...

Here's the full `EXPLAIN ANALYZE` results: ``` Nested Loop Left Join (cost=324672.11..326372.98 rows=1 width=294) (actual time=1759.517..1763.367 rows=1 loops=1) Join Filter: (t.bbl = thv.bbl) CTE total_res_units -> Index Scan using pluto_19v2_bbl_idx...

The biggest candidates I can see for refactoring are 1; `complaint category` - maybe we can switch the `order by desc limit 1` to a `max` function. 2. `complaint_category_with_bbl` -...

Added an index on bbl on the hpd_complaints table over on the `nycdb` repo.

To do: add the new stats on here before closing the issue.