On Tue, Aug 27, 2019 at 10:48 AM Arnaud L. <arnaud.listes@codata.eu> wrote:
> I can run the script just fine during working hours.
I meant thru your scheduler (cron or something).
> It hangs against the same line in the sql script, all lines being "\copy
> (select ....) to 'file on unc share'".
This is a new detail to me: what if you output to a local file and
move it after on the share?
> This line is simply the longest running query because the view inside
> the select outputs almost 1M rows and does some subqueries.
>
I still don't get: is the line content the longest or the highest
numbered in the output?
> Also when the script is hung, output has not started (file size is 0).
This makes me think there is some problem with the share, not the
script. Again: test against a local file that you move (rsync?) to the
share after.
Luca