Re: how to improve perf of 131MM row table? - Mailing list pgsql-performance

From Matheus de Oliveira
Subject Re: how to improve perf of 131MM row table?
Date
Msg-id CAJghg4KZN0DxC34MRh1j_w+gAB6j=ho0Puwd5jcqJb-tOcyFzw@mail.gmail.com
Whole thread Raw
In response to Re: how to improve perf of 131MM row table?  (AJ Weber <aweber@comcast.net>)
List pgsql-performance

On Thu, Jun 26, 2014 at 11:07 AM, AJ Weber <aweber@comcast.net> wrote:
I will try this, but can you clarify the syntax?  I only know the VALUES clause from insert statements, and it would be one set of parens like VALUES('175769', '175771', ... )


That is for multiple columns, mine is for multiple rows (and it also work on INSERT to insert many rows at once).

The result would be:

    WHERE  node_id in
               VALUES(('175769'), ('175771'), ('175781'), ('175825'), ('175881'), ('175893'), ('175919'), ('175932'), ('175963'), ('175999'), ('176022'), ('176079'), ('176099'), ('176115'), ('176118'), ('176171'), ('176181'), ('176217'), ('176220'), ('176243'), ('176283'), ('176312'), ('176326'), ('176335'), ('176377'), ('176441'), ('176444'), ('176475'), ('176530'), ('176570'), ('176623'), ('176674'), ('176701'), ('176730'), ('176748'), ('176763'), ('176771'), ('176808'), ('176836'), ('176851'), ('176864'), ('176881'), ('176929'), ('176945'), ('176947'), ('176960'), ('177006'), ('177039'), ('177079'), ('177131'), ('177144'))


You seem to indicate a VALUES clause that has strange parenthesis corresponding to it.

No, nothing strange, you are just not aware of the syntax. See [1], and a more clear example (for INSERT) at [2], look for "To insert multiple rows using the multirow VALUES syntax:".

pgsql-performance by date:

Previous
From: AJ Weber
Date:
Subject: Re: how to improve perf of 131MM row table?
Next
From: AJ Weber
Date:
Subject: Re: how to improve perf of 131MM row table?