"Ciprian Dorin Craciun" <ciprian(dot)craciun(at)gmail(dot)com> writes:
> In short the data is inserted by using COPY sds_benchmark_data
> from STDIN, in batches of 500 thousand data points.
Not sure if it applies to your real use-case, but if you can try doing
the COPY from a local file instead of across the network link, it
might go faster. Also, as already noted, drop the redundant index.
regards, tom lane