Skip to content

[Feedback] Documented Subqueries outdated / pretty taxing #4642

@erinmikailstaples

Description

@erinmikailstaples

Is it easy to find the information you need?

Yes

Are the instructions clear?

No

How could we improve the Tiger Data documentation site?

From Michal Bartak in the community slack:

I believe I found a bug in the documentation.The example of using time_bucket_gapfill() with interpolate() presents subselects for datapoints from outside of time range (prev and next), where conditions and ordering of these subselects are wrongHope it will help.

Image

these subqueries are pretty taxing. In the past, I saw a github issue for that. The solution I found is to limit the subquery search by additional arbitrary boundary. ie time < X AND time > X - '1d'::INTERVAL . Maybe it should be mentioned in docs.Since the TimescaleDb has introduced last and first values, I expected it's more performant than ORDER BY LIMIT 1 approach.  In this particular case, even with additional arbitrary boundary, it's still a bit slower

Metadata

Metadata

Labels

best practicecommunityRaised by a community memberdocumentationImprovements or additions to documentationfeedbackSubmissions from the docs site feedback form

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions