Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 49D5A6326E6 for ; Thu, 7 Jan 2010 14:53:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 06028-04 for ; Thu, 7 Jan 2010 18:53:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mail.postgresql.org (Postfix) with ESMTP id 4B4BE632284 for ; Thu, 7 Jan 2010 14:53:14 -0400 (AST) Received: by ewy26 with SMTP id 26so16972512ewy.3 for ; Thu, 07 Jan 2010 10:53:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=5kR56k4A1Jp6sk3HagEUd+EeFXpDry3kOF6XybUv4Co=; b=P38pBWsRim50qpnM8QDeVADGu2ID/mxHTAykKbiWciPhAaDkJrH5mKQQnJq6jkeNHF q0DmlOic/etMKQ+ojpMX1JgSkoq8KmeREJJbo1FS24vlDkzzATtn50dndBmMeWlC1sn0 2Ny6GSkT41kHMxCRwnqiWUqvBVKX57vosDlBk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=VAf0CydszdwHa8te/jGXFcNk0VymtoL7xy9pjnfYEuvPSslc05sqIr2PUhSM48+493 XhjPtUfp6XSuKwfK7G3q+0UdrKyRjIbZaA22rvoB7a2kH8oyj7pWOGt6SpUSWDKQMkP+ Ko0wSv6JHrZEutQ89AxvgJqwsPdFcK32cCYSM= MIME-Version: 1.0 Received: by 10.216.93.14 with SMTP id k14mr961673wef.152.1262890392696; Thu, 07 Jan 2010 10:53:12 -0800 (PST) In-Reply-To: References: From: Nikolas Everett Date: Thu, 7 Jan 2010 13:52:40 -0500 Message-ID: Subject: Re: Joining on text field VS int To: Radhika S Cc: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d7e0643f3780047c97957c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201001/118 X-Sequence-Number: 36998 --0016e6d7e0643f3780047c97957c Content-Type: text/plain; charset=ISO-8859-1 Joining via a tinyint or something will make your large table smaller which is nice. Smaller tables = faster tables. On Wed, Jan 6, 2010 at 11:21 PM, Radhika S wrote: > Hi, > I am going to test this out but would be good to know anyways. A large > table is joined to a tiny table (8 rows) on a text field. Should I be > joining on an int field eg: recid intead of name? Is the performance > affected in either case? > Thanks . > --0016e6d7e0643f3780047c97957c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Joining via a tinyint or something will make your large table smaller which= is nice. =A0Smaller tables =3D faster tables.

On Wed, Jan 6, 2010 at 11:21 PM, Radhika S <rs88820@gmail.com> wrote:
Hi= ,
I am going to test this out but would be good to know anyways. A large=
table is joined to a tiny table (8 rows) on a text field. Should I be
jo= ining on an int field eg: recid intead of name? Is the performance
affected in either case?
Thanks .

--0016e6d7e0643f3780047c97957c--