Subject | Re: [ib-support] Unique constraint not an index? was Re: Error:Object is in use |
---|---|
Author | Jörg Schiemann |
Post date | 2001-02-24T18:52:36Z |
> At 04:03 PM 23-02-01 +0100, you wrote:for the optimizer.
> >Helen Borrie wrote:
> >
> > > No. The unique constraint isn't an index, so it won't cause problems
> > >I'm not
> > > >I still don't know if IB creates an index on unique, I think so, but
> > > >sure.and it won't be used by the optimizer for joins.
> > >
> > > No, it doesn't...well, it kinda does...but it's an internal structure
> > >RDB$INDEX_NAME RDB$RELATION_NAME
> >
> >Are You sure?
> >I created the table with a unique constraint and if I look with IB_WISQL
> >it shows me
> >an unique index on ORDER_ID, ORDER_POS
> >and an index on ORDER_ID
>
> This could be an anomaly in IB_WISQL or a bug introduced by IB 6 or...Ann?
>
> Try checking the output of this query:
>
> select rdb$index_name, rdb$relation_name from rdb$indices
> where rdb$relation_name = 'PARTS'
=============================== ===================
RDB$PRIMARY21 PARTS
RDB$FOREIGN22 PARTS
RDB$23 PARTS
IDX_DRAFT_NO PARTS
RDB$23 is the unique constraint.
Regards,
Jörg Schiemann