Re: How to run in parallel in Postgres, EXECUTE_PARALLEL

2019-12-08 Thread Lars Aksel Opsahl
> From: Joe Conway > Sent: Sunday, December 8, 2019 9:04 PM > To: Lars Aksel Opsahl; Laurenz Albe; pgsql-performance@lists.postgresql.org > Subject: Re: How to run in parallel in Postgres, EXECUTE_PARALLEL > > On 12/8/19 1:14 PM, Lars Aksel Opsahl wrote: > > Do you

Re: How to run in parallel in Postgres, EXECUTE_PARALLEL

2019-12-08 Thread Joe Conway
On 12/8/19 1:14 PM, Lars Aksel Opsahl wrote: > Do you or anybody know if there are any plans for a function call that > support the calling structure below or something like it and that then > could finish in 1 second ? (If you are calling a void function, the > return value should not be any probl

Re: How to run in parallel in Postgres, EXECUTE_PARALLEL

2019-12-08 Thread Lars Aksel Opsahl
>You cannot run several queries in parallel in a PostgreSQL function. > >You may want to have a look at PL/Proxy which might be used for things like >that. > >Yours, >Laurenz Albe >-- >Cybertec | https://www.cybertec-postgresql.com Hi Laurenz The code below takes 3, seconds DO $body$ DECLARE

Re: How to run in parallel in Postgres

2019-12-07 Thread Lars Aksel Opsahl
> From: Justin Pryzby > Sent: Saturday, December 7, 2019 2:25 AM > To: Lars Aksel Opsahl > Cc: pgsql-performance@lists.postgresql.org > > Subject: Re: How to run in parallel in Postgres > > On Thu, Dec 05, 2019 at 12:10:42PM +, Lars Aksel Opsahl wrote: &g

Re: How to run in parallel in Postgres

2019-12-07 Thread Lars Aksel Opsahl
>From: Ondrej Ivanič >Sent: Saturday, December 7, 2019 2:23 AM >Cc: pgsql-performance@lists.postgresql.org > >Subject: Re: How to run in parallel in Postgres > >Hi Lars, > >I have two suggestions: > >- `xargs` almost always present and it ca

Re: How to run in parallel in Postgres

2019-12-06 Thread Justin Pryzby
On Thu, Dec 05, 2019 at 12:10:42PM +, Lars Aksel Opsahl wrote: > I have a function that prepares data, so the big job can be run it in > parallel. > > Since Postgres now supports parallel I was wondering if it's easy to trigger > parallel dynamically created SQL calls. > > If you look at >

Re: How to run in parallel in Postgres

2019-12-06 Thread Ondrej Ivanič
Hi Lars, I have two suggestions: - `xargs` almost always present and it can run in parallel (-P) but script needs to be changed: for((i=1;i<=28;i++)); do echo "SELECT find_overlap_gap_single_cell('test_data.overlap_gap_input_t1','geom',4258,'test_data.overlap_gap_input_t1_res',${I},28);"; done |

Re: How to run in parallel in Postgres

2019-12-06 Thread Lars Aksel Opsahl
>From: Laurenz Albe >Sent: Thursday, December 5, 2019 5:42 PM >To: Lars Aksel Opsahl ; >pgsql-performance@lists.postgresql.org >Subject: Re: How to run in parallel in Postgres > >On Thu, 2019-12-05 at 12:10 +, Lars Aksel Opsahl wrote: >> have a function tha

Re: How to run in parallel in Postgres

2019-12-05 Thread Laurenz Albe
On Thu, 2019-12-05 at 12:10 +, Lars Aksel Opsahl wrote: > have a function that prepares data, so the big job can be run it in parallel. > > Today I have solved this by using "Gnu parallel" like this. > psql testdb -c"\! psql -t -q -o /tmp/run_cmd.sql testdb -c\"SELECT > find_overlap_gap_make