X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6C7DB32C2F3 for ; Fri, 15 Oct 2004 08:28:27 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11608-02 for ; Fri, 15 Oct 2004 07:28:22 +0000 (GMT) Received: from mailer.unicite.fr.netcentrex.net (unknown [62.161.167.249]) by svr1.postgresql.org (Postfix) with ESMTP id B60AB32C2FC for ; Fri, 15 Oct 2004 08:28:20 +0100 (BST) Received: from akira ([192.168.101.228]) by mailer.unicite.fr.netcentrex.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 42CYABK1; Fri, 15 Oct 2004 09:28:18 +0200 From: "Alban Medici (NetCentrex)" To: "'Igor Maciel Macaubas'" , Subject: Re: View & Query Performance Date: Fri, 15 Oct 2004 09:28:18 +0200 Organization: NetCentrex MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0050_01C4B299.4E97AD00" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcSyMMsrEu7NNwBtSRmj3nO3Tb/vEQAV2chA In-Reply-To: <001301c4b231$280c4190$6801a8c0@providerst.local> Message-Id: <20041015072820.B60AB32C2FC@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=HTML_60_70, HTML_FONTCOLOR_BLUE, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200410/207 X-Sequence-Number: 8683 This is a multi-part message in MIME format. ------=_NextPart_000_0050_01C4B299.4E97AD00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can you tell us more about the structure of your tables, witch sort of index did you set on witch fields ? =20 Did you really need to get ALL records at once, instead you may be could use paging (cursor or SELECT LIMIT OFFSET ) ? =20 And did you well configure your .conf ? =20 Regards =20 Alban M=E9dici _____=20=20 From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Igor Maciel Macaubas Sent: jeudi 14 octobre 2004 23:03 To: pgsql-performance@postgresql.org Subject: [PERFORM] View & Query Performance Hi all, =20 I'm trying to find smarter ways to dig data from my database, and have the following scenario: =20 table1 -- id -- name =2E =2E =2E =2E =2E =2E =20 table2 -- id -- number =2E =2E =2E =2E =2E =2E =20 I want to create a view to give me back just what I want: The id, the name and the number. I tought in doing the following: create view my_view as select t1.id, t1.name, t2.number from table1 as t1, table2 as t2 where t1.id =3D t2.id; =20 Will this be enough fast ? Are there a faster way to make it work ?! This table is mid-big, around 100K registers ..=20 =20 Regards, Igor -- igor@providerst.com.br =20 =20 =20 ------=_NextPart_000_0050_01C4B299.4E97AD00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Can you tell us more about the structure of your= =20 tables,
witch sort of index did you set on witch fields=20 ?
 
Did you really need to get ALL records at=20 once, instead you may be could use pa= ging=20 (cursor or SELECT LIMIT OFFSET ) ?
 
And did you= well=20 configure your .conf ?
 
Regards
 
Alban=20 M=E9dici


From: pgsql-performance-owner@postgresq= l.org=20 [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Igor Ma= ciel=20 Macaubas
Sent: jeudi 14 octobre 2004 23:03
To:=20 pgsql-performance@postgresql.org
Subject: [PERFORM] View & Qu= ery=20 Performance

Hi all,
 
I'm trying to find smarter ways to dig = data from=20 my database, and have the following scenario:
 
table1
-- id
-- name
.
.
.
.
.
.
 
table2
-- id
-- number
.
.
.
.
.
.
 
I want to create a view to give me back= just=20 what I want:
The id, the name and the number.=
I tought in doing the following:=
create view my_view as select= t1.id,=20 t1.name, t2.number from table1 as t1, table2 as t2 where t1.id = =3D=20 t2.id;
 
Will this be enough fast ? Are there a = faster=20 way to make it work ?!
This table is mid-big, around 100K regi= sters ..=20
 
Regards,
Igor
--
igor@providerst.com.br
 
 
 
------=_NextPart_000_0050_01C4B299.4E97AD00--