Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong indexes at distributed hypertable for iot case #182

Open
dssysolyatin opened this issue Nov 26, 2021 · 0 comments
Open

Wrong indexes at distributed hypertable for iot case #182

dssysolyatin opened this issue Nov 26, 2021 · 0 comments

Comments

@dssysolyatin
Copy link

Hi!
There is a point in the documentation for tsdb_load_timescale:

Please note, -in-table-partition-tag is required for multi-node TimescaleDB benchmark testing. Currently, the multi-node query engine does not support push-down of JOINs and so the most efficient queries will filter on the primary tag name.

If specify -in-table-partition-tag flag then index (name, time) will be created instead of (tags_id, time). But benchmark has queries which look like:

SELECT t.%s, t.%s, r.*
FROM tags t INNER JOIN LATERAL
	(SELECT longitude, latitude
	FROM readings r
	WHERE r.tags_id=t.id
	ORDER BY time DESC LIMIT 1)  r ON true
WHERE t.%s`

It is superslow because readings does not have (tags_id, time) index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant