Re: how to improve perf of 131MM row table?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Jun 26, 2014 at 11:07 AM, AJ Weber <aweber@xxxxxxxxxxx> 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:".

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux