F
F
FNY3PM2019-01-09 02:34:33
Python
FNY3PM, 2019-01-09 02:34:33

Is the write speed normal?

Hello. There is a file with an array of test data (1 million elements: login, password, date of registration). Python reads a file and writes it to the database in 23 seconds. Is this a normal result? What good indicators are there when writing something like this to the database? Perhaps there are some features that will help speed up the process?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2019-01-09
@FNY3PM

Perhaps there are some features that will help speed up the process

Writing all data to the database in one transaction, instead of a separate transaction to write each row of data.

I
Ivan Shumov, 2019-01-09
@inoise

Streaming reading of the file and distributed writing to the database is perhaps faster), but here you must either clearly divide the file into parts, or have a message broker. But for a one-time operation, this is an unnecessary complication.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question