Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle trim in a where clause
Hi !
I have a performace problem on a SQL statement. I have to join a table column of type CHAR(100) over a dblink (the table comes from an external provider and can't be modified) My identifier value comes from a sequence. The dblink's table column identifier is formatted as (SomeChars || myId) + the spaces of the CHAR.
It seems that using:
select myColumn from myTable a, DbLinkTable b where 'SomeChars'||a.myId =
trim(b.id)
performs quite bad.
I tried to append 88 spaces after my ID to avoid the trim: it is fast, but quite ugly (I'll have to remember to remove one whitespace when my sequence's length increases).
Anyone sees a solution ?
Thanks
PS: The only solution I see would be to add a CHAR(100) column to my table, which would contain (SomeChars || myId). I would like to avoid that... Received on Mon Oct 02 2006 - 03:37:32 CDT
![]() |
![]() |