Skip to content

Conversation

@puzpuzpuz
Copy link
Contributor

@puzpuzpuz puzpuzpuz commented Feb 17, 2025

@puzpuzpuz puzpuzpuz added the documentation Improvements or additions to documentation label Feb 17, 2025
@puzpuzpuz puzpuzpuz self-assigned this Feb 17, 2025
@puzpuzpuz
Copy link
Contributor Author

@glasstiger could you add new mat view-related permissions to the docs here?

@puzpuzpuz
Copy link
Contributor Author

@glasstiger thanks for adding the permissions!

@github-actions
Copy link

github-actions bot commented Feb 18, 2025

🚀 Build success!

Latest successful preview: https://preview-140--questdb-documentation.netlify.app

Commit SHA: 70d1957

📦 Build generates a preview & updates link on each commit.

@puzpuzpuz puzpuzpuz marked this pull request as ready for review February 18, 2025 18:06
@javier
Copy link
Contributor

javier commented Feb 19, 2025

is it intentional that the pages don't appear on the concepts or SQL syntax sections for now and need to be accessed directly by url?

@javier
Copy link
Contributor

javier commented Feb 19, 2025

Do you think it would make sense to add some more advanced example showing you can use subqueries/CTEs, and even featuring things like window functions as long as you end yo doing a SAMPLE BY? As in this query here

create materialized view price_1m as (
  with r as (
    select *, lag(price) over(partition by symbol order by timestamp) as pprice 
      from btc_trades4
    ),
   t as ( (
    select symbol, last(price) as price, last(pprice) as pprice, timestamp 
      from r 
      order by timestamp) timestamp(timestamp) 
  ) select  timestamp, symbol, last(price) as price, last(pprice) as pprice
      from t sample by 1m
) timestamp(timestamp) partition by DAY;

@puzpuzpuz
Copy link
Contributor Author

is it intentional that the pages don't appear on the concepts or SQL syntax sections for now and need to be accessed directly by url?

No, that was a bug. Fixed it (hopefully) in 7c3eda9

@puzpuzpuz
Copy link
Contributor Author

Do you think it would make sense to add some more advanced example showing you can use subqueries/CTEs, and even featuring things like window functions as long as you end yo doing a SAMPLE BY? As in this query here

Sure. Feel free to add it yourself or I can add it, say, to the examples on the CREATE MATERIALIZED VIEW page, but I'll need a short description of the query.

@goodroot goodroot self-requested a review February 19, 2025 17:56
- **Deduplication has no noticeable performance penalty**.

<!--
## Retention strategies with TTL and materialized views
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javier FYI

@nwoolmer nwoolmer merged commit dde5463 into main Mar 20, 2025
2 checks passed
@nwoolmer nwoolmer deleted the puzpuzpuz_mat_views branch March 20, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants