Try This Example ...I tested with a number and a varchar:
create table t ( x number, y varchar2(10) );
insert into t values ( 596849, '596849' );
create index t1_idx on t(x);
create index t2_idx on t(y);
i dumped the blocks, the t1_idx had these bytes:
col 0; len 4; (4): c3 3c 45 32
and t2_idx had:
col 0; len 6; (6): 35 39 36 38 34 39
and if you
1 select dump(596849,16),
2 chr(to_number('35','xx'))||
3 chr(to_number('39','xx'))||
4 chr(to_number('36','xx'))||
5 chr(to_number('38','xx'))||
6 chr(to_number('34','xx'))||
7 chr(to_number('39','xx'))
8* from dual
SQL> /
DUMP(596849,16) CHR(TO
------------------------ ------
Typ=2 Len=4: c3,3c,45,32 596849
You can see how that data matches up
Then I:
alter index t1_idx rebuild reverse;
alter index t2_idx rebuild reverse;
and dumped again...
col 0; len 4; (4): 32 45 3c c3
col 0; len 6; (6): 39 34 38 36 39 35
which is:
1 select chr(to_number('39','xx'))||
2 chr(to_number('34','xx'))||
3 chr(to_number('38','xx'))||
4 chr(to_number('36','xx'))||
5 chr(to_number('39','xx'))||
6 chr(to_number('35','xx'))
7* from dual
SQL> /
CHR(TO
------
948695
it reverses the entire string
Thanks & Regards,
Rajesh Kumar Mathur
Tech Mahindra Ltd.
Sharda Center.
Erandwane. Pune - 04
Mob:- 9860564121
Quoting Hans <oracledba-ezmlmshield-x41476608.[Email address protected]
> Not true...
>
> According to the Concepts (checked in 9i and 10g) :
>
> "Creating a reverse key index, compared to a standard index,
> reverses the bytes of each column indexed (except the rowid) while
> keeping the column
> order"
>
> See the following link
> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/schema
> .htm#sthref998
> in Chapter "5 Schema Objects"
>
> Hans
>
>
> -----Original Message-----
> From: Rajesh Mathur
> [mailto:oracledba-ezmlmshield-x73803182.[Email address protected]
> Sent: woensdag 30 augustus 2006 12:41
> To: LazyDBA Discussion
> Subject: RE: reverse index
>
>
>
> Dear Stephen,
>
> If you are crating the reverse index... avoid to perform range scan.
>
> In my opinion, it reverse the entire string wether it is a number or
> varchar.
>
> e.g:= abc123 gives you 321cba
>
>
>
> Thanks & Regards,
> Rajesh Kumar Mathur
> Tech Mahindra Ltd.
> Sharda Center.
> Erandwane. Pune - 04
> Mob:- 9860564121
>
>
> Quoting Hans <oracledba-ezmlmshield-x1752719.[Email address protected]
>
> >
> > Creating a reverse key index, compared to a standard index, reverses
> > the bytes of each column indexed (except the rowid) while keeping the
> > column order.
> >
> >
> > I think it will be cba321
> >
> > Hans
> >
> > -----Original Message-----
> > From: Weston Stephen [mailto:oracledba-ezmlmshield-x23336752.[Email
> > address protected]
> > Sent: woensdag 30 augustus 2006 9:54
> > To: LazyDBA Discussion
> > Subject: RE: reverse index
> >
> >
> > The 'reverse' key will be abc123.
> >
> > The meaning of reverse key is the same as order by xxx desc. In other
> > words it will be in highest to lowest sort order,
> >
> > Stephen
> >
> > -----Original Message-----
> > From: Qi cheng
> > [mailto:oracledba-ezmlmshield-x48193168.[Email address protected]
> > Sent: 29 August 2006 22:08
> > To: LazyDBA Discussion
> > Subject: reverse index
> >
> > if a reverse index key has more than one column, will reverse index
> > reverse the first column or the concat columns?
> >
> > let's say, column1 is 'abc' column2 is '123', the reverse key will be
> > cba123 or 321abc, or 321cba?
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post
>
> > a dba job: http://jobs.lazydba.com To Subscribe :
> > http://www.LazyDBA.com To unsubscribe:
> > http://www.lazydba.com/unsubscribe.html
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post
>
> > a dba job: http://jobs.lazydba.com To Subscribe :
> > http://www.LazyDBA.com To unsubscribe:
> > http://www.lazydba.com/unsubscribe.html
> > -----------------------------------------------------------------
> > ATTENTION:
> > The information in this electronic mail message is private and
> > confidential, and only intended for the addressee. Should you
> > receive this message by mistake, you are hereby notified that
> > any disclosure, reproduction, distribution or use of this
> > message is strictly prohibited. Please inform the sender by
> > reply transmission and delete the message without copying or
> > opening it.
> >
> > Messages and attachments are scanned for all viruses known. If this
> > message contains password-protected attachments, the files have NOT
> > been scanned for viruses by the ING mail domain. Always scan
> > attachments before opening them.
> > -----------------------------------------------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post
>
> > a dba job: http://jobs.lazydba.com To Subscribe :
> > http://www.LazyDBA.com To unsubscribe:
> > http://www.lazydba.com/unsubscribe.html
> >
> >
>
>
>
> ========================================================================
> ====================================================
>
> Tech Mahindra, formerly Mahindra-British Telecom.
>
> Disclaimer:
>
> This message and the information contained herein is proprietary and
> confidential and subject to the Tech Mahindra policy statement, you may
> review at <a
> href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahind
> ra.com/Disclaimer.html</a> externally and <a
> href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahind
> ra.com/Disclaimer.html</a> internally within Tech Mahindra.
>
> ========================================================================
> ====================================================
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
> dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
> -----------------------------------------------------------------
> ATTENTION:
> The information in this electronic mail message is private and
> confidential, and only intended for the addressee. Should you
> receive this message by mistake, you are hereby notified that
> any disclosure, reproduction, distribution or use of this
> message is strictly prohibited. Please inform the sender by
> reply transmission and delete the message without copying or
> opening it.
>
> Messages and attachments are scanned for all viruses known.
> If this message contains password-protected attachments, the
> files have NOT been scanned for viruses by the ING mail domain.
> Always scan attachments before opening them.
> -----------------------------------------------------------------
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
============================================================================================================================
Tech Mahindra, formerly Mahindra-British Telecom.
Disclaimer:
This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.
============================================================================================================================
Oracle LazyDBA home page