home-assistant / home-assistant-notebooks

:notebook: Sample Jupyter Notebooks to explore Home Assistant data
https://data.home-assistant.io/
Other
63 stars 32 forks source link

Filter event type in db instead of python #11

Closed bramkragten closed 5 years ago

bramkragten commented 5 years ago

There is an index on event_type, so it would be better to filter it in the db.

SELECT count(*) FROM public.events: 1195585 SELECT count(*) FROM public.events WHERE event_type='call_service': 130662