* recorder: Apply filter in the outer query too Function _get_start_time_state_for_entities_stmt() produced a query which is dead-slow in my installation. On analysis, the outer query produced millions of rows which had to be joined to the subquery. The subquery has a filter which would eliminate almost all of the outer rows. To speed up the query, apply the same filter to the outer query, so way less rows have to be joined. This reduced the query time on my system from more than half an hour to mere milliseconds. * lint * merge filter --------- Co-authored-by: J. Nick Koston <nick@koston.org> |
||
---|---|---|
.. | ||
auto_repairs | ||
history | ||
models | ||
system_health | ||
table_managers | ||
__init__.py | ||
backup.py | ||
const.py | ||
core.py | ||
db_schema.py | ||
entity_registry.py | ||
executor.py | ||
filters.py | ||
manifest.json | ||
migration.py | ||
pool.py | ||
purge.py | ||
queries.py | ||
repack.py | ||
services.py | ||
services.yaml | ||
statistics.py | ||
strings.json | ||
tasks.py | ||
util.py | ||
websocket_api.py |