pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Guerrero <chimuelo22@yahoo.es>
To: pgsql-performance@postgresql.org
Subject: Cross Table (Pivot)
Date: Tue, 21 Jun 2011 04:35:53 +0100 (BST)
Message-ID: <688036.11174.qm@web26006.mail.ukl.yahoo.com> (raw)

CompaƱeros buenas noches:

Existe una sentencia SQL "fuertemente acoplada" al interios del Sistema Gestor 
de 
Bases de Datos Postgresql  que me permita "trasponer" tablas, 
algo similar al contrib cross table de tablefunc.

Estoy intentando con una sentencia como:

SELECT id, name, max(case()) as a, max(case()) as b
FROM table t1
INNER JOIN ...
INNER JOIN ...
GROUP BY id, name.

Sin embargo con un gran volumen de datos la sentencia se tarda mucho.

Agradezco de antemano sus comentarios y ayuda.


Atentamente,

Mario Guerrero

Message-ID: <688036.11174.qm@web26006.mail.ukl.yahoo.com>
Permalink:  ../688036.11174.qm@web26006.mail.ukl.yahoo.com/
Also on:    postgresql.org/message-id/688036.11174.qm@web26006.mail.ukl.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: chimuelo22@yahoo.es
  Subject: Re: Cross Table (Pivot)
  In-Reply-To: <688036.11174.qm@web26006.mail.ukl.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox