L
L
LightSid2018-02-15 12:35:43
PostgreSQL
LightSid, 2018-02-15 12:35:43

How to correctly write a large array of data to a SQL database?

The task is to import data from an excel document into a database.
Postgesql database
There can be a lot of lines (thousands) in a document, each line is a query to the database.
Now I am recording in a loop, it is very long and loads the server.
Please tell me how to correctly implement a record in the database, so that for the user it is in the background. Or how to make a query to write the entire array at once with one query?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
artemmityushov, 2018-02-15
@LightSid

postgresql copy csv

V
Viktor Taran, 2018-02-15
@shambler81

If this is an unloading from the database, then everything is simple, connect excel to the database directly and work online.
So that a girl with painted nails can do it through the GUI.
For the rest, you need to look at what and how you write, maybe it's the whole table, maybe the query can be the whole database
one-way exchange or two, synchoron or asynchronous.
In general, there is a finger in the water.
Describe the situation in more detail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question