Running two queries concurrently?
От | James David Smith |
---|---|
Тема | Running two queries concurrently? |
Дата | |
Msg-id | CAMu32AA72J=c7WCmS_bg0VnFrwd95gfBoUJhB+jVS56iSPG_bQ@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Running two queries concurrently?
|
Список | pgsql-novice |
Hi there, The more and more that I use PostgreSQL the more technical my queries are seeming to become, so here is the latest question/scenario I could do with some advice on please. Take the following hypothetical situation: QueryOne: I select 10000 rows from TABLE A using CRITERIA Y, and insert the result into TABLE B. This query takes 20 minutes to run. QueryTwo: Two minutes after QueryOne has begun, I select 5000 rows from TABLE A using CRITERIA X, and insert the result into TABLE B. This query takes 10 minutes to run. So my question really is, is this possible? I would have thought that perhaps QueryOne puts a lock on TABLE A and TABLE B while it is selecting data from one and inserting into the other, but maybe not? At the moment I have to do QueryOne and then QueryTwo quite a few times, but have been doing them one after another. Maybe I can actually run them at the same time? Best wishes James
В списке pgsql-novice по дате отправления: