Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: tuning query with concat string.

Re: tuning query with concat string.

From: LiShan Cheng <exriscer_at_gmail.com>
Date: Tue, 21 Mar 2006 16:53:48 +0100
Message-ID: <6e9345580603210753h5388821cr1cb573ad5532957f@mail.gmail.com>


Hi

You dont have problem with that query if your column is indexed, ws_id has high cardinality (S'||userenv('SESSIONID') as well)

You will have problem (unless you use FBI) if you concat in the column such as

S||ws_id

On 3/21/06, The Human Fly <sjaffarhussain_at_gmail.com> wrote:
>
> I think my question was littble confused.
>
> Okay, following is the query that I wanted to write,
>
> select max(start_time) from fm_audit_form where ws_id =
> 'S'||userenv('SESSIONID')
>
> Is there any way that I can rewrite this query?
>
> Long time ago, I have read that we can rewrite queries that has concat
> in the where clause values.
>
>
>
> On 3/21/06, Wolfgang Breitling <breitliw_at_centrexcc.com> wrote:
> > SELECT ...... FROM where COLUMN = 'SVALUE2';
> >
> > :-)
> >
> > Quoting The Human Fly <sjaffarhussain_at_gmail.com>:
> >
> > > How can I rewrite the query which uses concatination in the where
> > > clause? For an example,
> > >
> > > SELECT ...... FROM where COLUMN = 'S'||'VALUE2';
> > >
> > --
> > regards
> >
> > Wolfgang Breitling
> > Oracle 7,8,8i,9i OCP DBA
> > Centrex Consulting Corporation
> > www.centrexcc.com
> >
> >
>
>
> --
> Best Regards,
> Syed Jaffar Hussain
> 8i,9i & 10g, OCP DBA
> Banque Saudi Fransi,
> Saudi Arabia
> http://jaffardba.blogspot.com/
>
> ----------------------------------------------------------------------------------
> "Winners don't do different things. They do things differently."
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 21 2006 - 09:53:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US