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

It's not friendly when table partitioning is used. #104

Open
prochac opened this issue Sep 9, 2024 · 2 comments
Open

It's not friendly when table partitioning is used. #104

prochac opened this issue Sep 9, 2024 · 2 comments

Comments

@prochac
Copy link
Contributor

prochac commented Sep 9, 2024

Partitions are listed among other tables, leading to a very noisy list.

The relations can be easily listed, in Postgres, by

SELECT *
FROM pg_partition_tree('action_gateway');

BTW, MySQL also supports partitioning, but I have zero experience here.

CREATE TABLE sales (
    id INT,
    sale_date DATE,
    amount DECIMAL(10,2)
) PARTITION BY RANGE(YEAR(sale_date)) (
    PARTITION p2021 VALUES LESS THAN (2022),
    PARTITION p2022 VALUES LESS THAN (2023)
);

https://dev.mysql.com/doc/refman/8.4/en/partitioning-overview.html

@jorgerojas26
Copy link
Owner

I'm planning to rewrite the entire Tree, right now that code is messy and not scalable, it only supports 3 levels of depth only. In general, i don't like it, so with that rewrite i think it would be easier to implement partitions.

@prochac
Copy link
Contributor Author

prochac commented Sep 12, 2024

I looked at how it's implemented in DataGrip (which has super slow starts, that's why I'm considering lazysql), and they do use some kind of recursion. Columns, indexes, sequences, triggers, and partitions are one level below the table. And if you open the partition, it's again the columns, indexes...

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

2 participants