Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 2 Oracle doubts
"Karsten Farrell" <kfarrell_at_belgariad.com> wrote in message
news:MPG.198b278b28f7438298980b_at_news.la.sbcglobal.net...
> I understand your point. However, most of our lookup tables are not
> maintained. They are loaded by a sql script once and just sit there. If
> there's an error (such as a duplicate) that sneaks in, the table is simply
> recreated. Unless someone is really interested in messing it up by using
> sqlplus, there's little chance of duplicates sneaking in.
> --
> [:%s/Karsten Farrell/Oracle DBA/g]
But you don't *need* to worry about 'errors sneaking in', or someone
'messing it up by using SQL*Plus'.
Just put a PK constraint on the table. It costs nothing (all right, 2
blocks).
Then there won't be 'little chance' of duplicates; there will be *no*
chance.
And if CBO can't recognise that the table will fit into one read, and that the index is not a good one to use(whether or not the table is cached), I'll eat my red hat.
Regards,
Paul
Received on Sat Jul 26 2003 - 14:47:44 CDT