Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 08B2EB5DBDC for ; Tue, 21 Jun 2011 00:42:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 07617-06 for ; Tue, 21 Jun 2011 03:42:14 +0000 (UTC) X-Greylist: delayed 00:06:17.547345 by SQLgrey-1.7.6 Received: from nm10-vm0.bullet.mail.ukl.yahoo.com (nm10-vm0.bullet.mail.ukl.yahoo.com [217.146.183.242]) by mail.postgresql.org (Postfix) with SMTP id D457EB5DBCB for ; Tue, 21 Jun 2011 00:42:13 -0300 (ADT) Received: from [217.146.183.217] by nm10.bullet.mail.ukl.yahoo.com with NNFMP; 21 Jun 2011 03:35:53 -0000 Received: from [217.146.183.163] by tm10.bullet.mail.ukl.yahoo.com with NNFMP; 21 Jun 2011 03:35:53 -0000 Received: from [127.0.0.1] by omp1004.mail.ukl.yahoo.com with NNFMP; 21 Jun 2011 03:35:53 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 918887.58542.bm@omp1004.mail.ukl.yahoo.com Received: (qmail 16936 invoked by uid 60001); 21 Jun 2011 03:35:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s1024; t=1308627353; bh=mGRpGTwsI6IC7RCKOOr/ofTOcV7rmDggx9D4rE1NYCE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=d+SqgdlKUrgFXj3PTZacRFERydWA6P8YEa9N5Y0vChr5TfQg+mTu7qBdWsIWGs/MZU1s7BJE2tRJFvNE7F5WfY+4IahTmjP2WVaC1kJiQEr5RIvBUB0Dl9Php45GKSsJPBC6icG5RGJ3qF/QVydTJONeDblaEMsISflF3gVqb9E= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.es; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=X57DUzxWj+ua4p2FB7HghTMwOXFuQwC0Xd+U5xsdQUQShow1u5qVU29WrkOf+AuhtECID/UPNWJ07FM8x/ZVn3U7t1ni0KIXcW0Eu877hzYnik/IAplCwnnCkTf2Smgz+rGm7dxrDcX17l/b3nK3pPz6ZEBmr9NHJjYNbYM8FiU=; Message-ID: <688036.11174.qm@web26006.mail.ukl.yahoo.com> X-YMail-OSG: MPPywNYVM1lTyl_3MghVV6zv2EWRmVuz2PofYcQIHApyemz 18mdq6zC4gChwmDqFiOOpwTni5oyDlldFnXmOT0TJg1D54zdDBKHeGIm7CLh aav37kFKaSiAXVd8tQm9RVhtkNBXOMP0YUK8NQSJCGzwXdIOygntfeV1PTMB IPQlH90tJx0KINiW4Nf_0Aqt4GED7vfV6IOEmBNNxuG2E7S.DpFb1tjp9twx J4GVJIO54ksQxIzQZTrkwPYqkp0XyBjD4VUOlJbFL.Y7UVbN1ruJ.YwMQYq0 xFMX9xP7SCcpKCC0s.24hOYeFxnt0UAVofkFHXK1FaOwKs.ASCcZeOUCGht5 hgiAtAK2.u2TbGOHgEbfhz2D52Q-- Received: from [186.113.60.117] by web26006.mail.ukl.yahoo.com via HTTP; Tue, 21 Jun 2011 04:35:53 BST X-Mailer: YahooMailRC/570 YahooMailWebService/0.8.111.304355 Date: Tue, 21 Jun 2011 04:35:53 +0100 (BST) From: Mario Guerrero Subject: Cross Table (Pivot) To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1700831437-1308627353=:11174" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.346 tagged_above=-10 required=5 tests=BAYES_50=0.8, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, HTML_FONT_FACE_BAD=0.981, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: *** X-Archive-Number: 201106/189 X-Sequence-Number: 44122 --0-1700831437-1308627353=:11174 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Compa=F1eros buenas noches:=0A=0AExiste una sentencia SQL "fuertemente acop= lada" al interios del Sistema Gestor =0Ade =0ABases de Datos Postgresql qu= e me permita "trasponer" tablas, =0Aalgo similar al contrib cross table de = tablefunc.=0A=0AEstoy intentando con una sentencia como:=0A=0ASELECT id, na= me, max(case()) as a, max(case()) as b=0AFROM table t1=0AINNER JOIN ...=0AI= NNER JOIN ...=0AGROUP BY id, name.=0A=0ASin embargo con un gran volumen de = datos la sentencia se tarda mucho.=0A=0AAgradezco de antemano sus comentari= os y ayuda.=0A=0A=0AAtentamente,=0A=0AMario Guerrero --0-1700831437-1308627353=:11174 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Compa=F1eros buenas noches:=

Existe una sentencia= SQL "fuertemente acoplada" al inter= ios 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, na= me, max(case()) as a, max(case()) as b
FROM table t1<= /div>
INNER JOIN ...
INNER JOIN = ...
GROUP BY id, name.

Sin embargo con un gran volumen de dat= os la sentencia se tarda mucho.

Agradezco de antemano sus comentarios&nb= sp;y ayuda.
=

Atentamen= te,

Mario Guer= rero
=0A=0A=0A
--0-1700831437-1308627353=:11174--