Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: Creating in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 5 Topic 4063 of 4294
Post > Topic >>

Re: Creating indexes

by asche.public@[EMAIL PROTECTED] (Asche) May 8, 2008 at 09:49 PM

--Apple-Mail-7-40732653
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hi,

> Hi, all. I want to ask what type of index is better to create for
> bigint types. I have table with bigint (bigserial) primary key. What

http://www.postgresql.org/docs/8.3/static/sql-createtable.html

PostgreSQL automatically creates an index for each unique constraint  
and primary key constraint to enforce uniqueness. Thus, it is not  
necessary to create an index explicitly for primary key columns.

> type is better to use for it? I tried btree and hash, but didn't

You already have an index on your bigint primary key. I think it is of  
type btree.

Jan
--Apple-Mail-7-40732653
Content-Type: text/html;
	charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; ">Hi,<div><br><div><blockquote type=3D"cite"><span =
class=3D"Apple-style-span" style=3D"-webkit-text-stroke-width: -1; ">Hi, =
all. I want to ask what type of index is better to create =
for</span></blockquote><blockquote type=3D"cite">bigint types. I have =
table with bigint (bigserial) primary key. =
What</blockquote><div><br></div><div><a =
href=3D"http://www.postgresql.org/docs/8.3/static/sql-createtable.html">ht=
tp://www.postgresql.org/docs/8.3/static/sql-createtable.html</a></div><div=
><br></div><span class=3D"Apple-style-span" style=3D"font-family: =
verdana; line-height: 18px; "><span =
class=3D"PRODUCTNAME">PostgreSQL</span>&nbsp;automatically creates an =
index for each unique constraint and primary key constraint to enforce =
uniqueness. Thus, it is not necessary to create an index explicitly for =
primary key columns.</span></div><div><font class=3D"Apple-style-span" =
face=3D"verdana"><span class=3D"Apple-style-span" style=3D"line-height: =
18px; "><br></span></font><blockquote type=3D"cite">type is better to =
use for it? I tried btree and hash, but =
didn't</blockquote><div><br></div></div>You already have an index on =
your bigint primary key. I think it is of type =
btree.</div><div><br></div><div>Jan</div></div></body></html>=

--Apple-Mail-7-40732653--
 




 5 Posts in Topic:
Creating indexes
Rauan Maemirov <rauan1  2008-05-08 12:00:39 
Re: Creating indexes
ahodgson@[EMAIL PROTECTED  2008-05-08 12:52:30 
Re: Creating indexes
lists@[EMAIL PROTECTED]   2008-05-08 22:08:17 
Re: Creating indexes
asche.public@[EMAIL PROTE  2008-05-08 21:49:26 
Re: Creating indexes
Rauan Maemirov <rauan1  2008-05-08 22:41:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:48:15 CDT 2008.