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

postgres: bulk insert API with UNNEST and ARRAYs #724

Open
gitmalong opened this issue Dec 17, 2023 · 4 comments
Open

postgres: bulk insert API with UNNEST and ARRAYs #724

gitmalong opened this issue Dec 17, 2023 · 4 comments

Comments

@gitmalong
Copy link

gitmalong commented Dec 17, 2023

Relates to:

Basically I would like to let SeaQuery build a Postgres bulk insert query in the following format:

insert into table(a, b) 
values(1, unnest(array[1, 2, 3]))

Benefits:

  • Avoids parameter count limitation as the the inserted values are an array
  • In general a smaller query before replacing placeholders
  • When working with batch data the current limitation leads to performance bottlenecks as one has to split huge batch inserts into smaller chunks to avoid running in the parameter count limit so this is really not just cosmetic
@gitmalong
Copy link
Author

Just filed a sponsorship to support this.

@tyt2y3
Copy link
Member

tyt2y3 commented Dec 27, 2023

Thank you for the sponsor. I'd put this on my stack.

@gitmalong
Copy link
Author

Hi. Any updates on this?

@tyt2y3
Copy link
Member

tyt2y3 commented May 30, 2024

Sorry for the delay. Yes, we have some time now as 1.0 is concluding. I have some plan regarding OLAP, including bulk data inserts and some extensions to TimescaleDB

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