SQL for bulk insert
See original GitHub issuesupport syntax for insert of multiple rows at once:
INSERT INTO table_name (column_list)
VALUES
(value_list_1),
(value_list_2),
...
(value_list_n);
Unknowns
Investigate if PostgreSQL supports bind variables in statement like that.
Implementation
It is very likely this insert will need to be executed without creating intermediate model. The existing QuestDb’s implementation of Insert is also deficient and this is an opportunity to prove it.
Considerations
-
insert should convert constant types similarly to how BindVariableService does. In that it should be possible to insert
null
into primitive types, such asint
,long
etc. It should also be possible to insert constantint
intoshort
andbyte
column, numeric value intochar
column etc. -
The implementation should be efficient and performant for frequent execution of insert statements
-
The implementation must not generate grabage
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
BULK INSERT (Transact-SQL) - SQL Server - Microsoft Learn
The BULK INSERT statement can be executed within a user-defined transaction to import data into a table or view. Optionally, to use multiple ......
Read more >SQL Server BULK INSERT
Introduction to the SQL Server BULK INSERT statement · First, specify the name of the table in the BULK INSERT clause. Note that...
Read more >Bulk Insert Data into SQL Server
The first argument for BULK INSERT should be a table name or a view name. · The second argument is the name of...
Read more >Guide to How Bulk Insert in SQL with Sample Queries - eduCBA
Introduction to SQL Bulk Insert ... Normal insert statements will only insert one row at a time into the database. But if you...
Read more >SQL Server Bulk Insert – Part 1 - {coding}Sight
According to Wikipedia, ”A Bulk insert is a process or method provided by a database management system to load multiple rows of data...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hi @Shivansh-Mittal you parse the JSON file in C# and then use a Postgres client to connect to QuestDB and use SQL bulk update as documented here
Can I insert json file data in my questdb table from C# ?