Persistant time_buckets for searching?

Hey, I am very, very new to timescale. I have a large dataset and my usecase is to select the data of a specific month, week or day. Afterwards I like to slice and dice the selected data.
My question is: Is it necessary to store the time_buckets persistant and create an index, or is timescale optimized to search for specific a time_buckets on the fly?

You can do both options. As for the persistent option, you may want to look into Continuous Aggregates, which pre-calculate data into the requested time buckets. It is perfectly fine though, to just request data into time buckets on the fly. Pre-aggregation is faster as it happens as a background job and materializes the already aggregated data for later querying (like a normal materialized view, just incrementally updated in the background).