S
S
Sergey2017-03-09 20:29:59
PostgreSQL
Sergey, 2017-03-09 20:29:59

Using libpq is slower than querying psql.exe, where is the delay?

There is a simple table with a small amount of test data, 10 rows. The database is located on the local computer, host=localhot. I make a simple query like UPDATE table_session SET session = 0 WHERE item_id = 30064; Where item_id is a PRIMARY KEY but not tied to a row index. EXPLAIN ANALYZE gives Planning Time 0.480 ms and Execution Time: 0.269 ms, which is quite normal for my normal computer. Then I make the same request through libpq using PQexec () and get a delay of 10 ms, that is, an order of magnitude more. Did PREPARE and still the same result. Where to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question