Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS[...]
От | Ron |
---|---|
Тема | Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS[...] |
Дата | |
Msg-id | 5fd32bf1-164c-742f-9e46-7c9cc547a0e1@gmail.com обсуждение исходный текст |
Ответ на | Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...] (Thorsten Schöning <tschoening@am-soft.de>) |
Ответы |
Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]
|
Список | pgsql-general |
On 6/8/20 3:14 AM, Thorsten Schöning wrote: > Hi all, > > I have an app exposing web services to generate reports. Those web > services accept multiple reports per request and calculate them > concurrently. There's one transaction spanning each entire request and > used by ALL spawned threads. The app makes sure that e.g. committing > transactions is handled by ONE thread only and individual statements > are NEVER reused by multiple threads. > > There are two types of reports: Some need to read data from the DB > themself, others can work on the data provided by the former ones. The > current implementation always creates temporary tables for results of > some query, so that one can simply check if some temporary table is > available and either only query that or create it before as necessary. > > I'm using "CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]" and the > associated queries can take a long time. Would a set of GLOBAL temporary tables be a better fit for your problem (eliminating the need to create temporary tables each time)? -- Angular momentum makes the world go 'round.
В списке pgsql-general по дате отправления: