title: What is the fastest way of exporting hundreds of thousands of rows on postgresql and nodejs?
body: <p>I've been working on exporting a complex SQL query that returns about 500.000 rows,</p>
  <p>I had built a nice stream pipe line that streams data from postgresql -&gt; converts into CSV -&gt; publish into S3.</p>
  <p>But I want it to be sync, and its being kind of a problem since its taking more then 10 minutes to finish everything.</p>
  <p>Is there a way I can do that in, like, 1 minute? If not, what would be the fastest way?</p>