| From: | Dave Cramer <pg(at)fastcrypt(dot)com> | 
|---|---|
| To: | Edoardo Ceccarelli <eddy(at)axa(dot)it> | 
| Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>, pgsql-performance(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org | 
| Subject: | Re: [JDBC] is a good practice to create an index on the oid? | 
| Date: | 2004-04-26 23:04:07 | 
| Message-ID: | 1083020647.13952.164.camel@localhost.localdomain | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin pgsql-jdbc pgsql-performance | 
Yes, you can create an index on the oid, but unless you are selecting on
it, it is of little use.
you would have to do select * from foo where oid=? to get any value out
of the index.
Dave
On Mon, 2004-04-26 at 12:38, Edoardo Ceccarelli wrote:
> I am using the oid of the table as the main key and I've found that is 
> not indexed (maybe because I have declared another primary key in the table)
> 
> it is a good practice to create an index like this on the oid of a table?
> CREATE INDEX idoid annuncio400 USING btree (oid);
> 
> 
> does it work as a normal index?
> 
> Thank you
> Edoardo
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>       message can get through to the mailing list cleanly
> 
> 
> 
> !DSPAM:408d7c38183971270217895!
> 
> 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Kings-Lynne | 2004-04-27 02:48:01 | Re: [PERFORM] is a good practice to create an index on the oid? | 
| Previous Message | Joel Garry | 2004-04-26 22:45:08 | Re: How configure Oracle 9i not case sensitive... | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Kings-Lynne | 2004-04-27 02:48:01 | Re: [PERFORM] is a good practice to create an index on the oid? | 
| Previous Message | Jan de Visser | 2004-04-26 21:36:34 | Re: BLOBS | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2004-04-27 00:03:25 | Re: Wierd context-switching issue on Xeon patch for 7.4.1 | 
| Previous Message | Josh Berkus | 2004-04-26 19:20:58 | Re: Wierd context-switching issue on Xeon |