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: Btmap Index

RE: Btmap Index

From: David Wagoner <dwagoner_at_arsenaldigital.com>
Date: Fri, 19 Jan 2001 11:50:08 -0500
Message-Id: <10746.127164@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C08237.E1755870
Content-Type: text/plain;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The SQL query should have the same column order in the select statement = as
the order in the bitmap index or it will not use the index. =20
=20
david
=20
=20

-----Original Message-----
From: Kevin Kostyszyn [mailto:kevin_at_dulcian.com] Sent: Monday, January 08, 2001 6:50 PM
To: Multiple recipients of list ORACLE-L Subject: Re: Btmap Index

I ran into a similar problem a while back. If the database is set to = use
the CBO, it might not use the index. Someone on this list gave a great reason why, perhaps the table is just very small and the CBO just = decided to
do a full table scan instead. You could use a hint and tell it to use = rule
based on that query and it will use the index on the where clause. = That's
what I did. The question is, how big is the table and how much data = does it
have in it? If it is not a lot, there really is nothing to be = concerned
about. Oh yeah, and almost 100% positive that there is no setting in = the
init file for the index. =20
Sincerely,
Kevin

Sent: Monday, January 08, 2001 5:45 PM
Subject: Btmap Index

Hi,
=20
Is there any init.ora parameter that needs to be turned to activate = bitmap
indexes?
I have a bitmap index on one column C1, but when i examine the explain = pan
of the=20
query: " select C1, b, c from table TT where C1 in ('dd','ff')" , it = looks
like it is not using
the index but doing a full table scan... =20
thanks
-krishna

-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of Jacques Kilchoer
Sent: Monday, January 08, 2001 2:01 PM
To: Multiple recipients of list ORACLE-L Subject: RE: Date comparison question

> -----Original Message-----=20
> From: Lisa Yates [ mailto:cosnit_at_creighton.edu
<mailto:cosnit_at_creighton.edu> ]=20
> Sent: lundi, 8. janvier 2001 11:27=20

>=20

> Why doesn't this query ever return...=20
>=20

> where run_date =3D to_date('01-03-2001 16:34:59','mm-dd-yyyy=20
> hh24:mi:ss')=20
>=20

> but this query does....=20
>=20

> where to_char(run_date) =3D to_char(to_date('01-03-2001=20
> 16:34:59','mm-dd-yyyy hh24:mi:ss'))=20
>=20

> and so does this query....=20
>=20

> where to_char(run_date,'mm-dd-yyyy hh24:mi:ss') =3D '01-03-2001=20
> 16:34:59'=20

Well, I guess my suggestion that run_date may contain a "BCE" (before = common
era) date was not the answer to your problem. Maybe I misunderstood the issue. When you say "why doesn't the query ever return", do you mean it returns zero rows, or do you mean that the query is taking an = abnormally
long time? If it's taking an abnormally long time, an explain plan on = the
two queries may reveal the cause.

Jacques R. Kilcho=EBr=20
(949) 754-8816=20
Quest Software, Inc.=20

8001 Irvine Center Drive=20
Irvine, California 92618=20
U.S.A.=20
http://www.quest.com <http://www.quest.com> =20

------_=_NextPart_001_01C08237.E1755870
Content-Type: text/html;

        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: Date comparison question</TITLE>

<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>

<BODY bgColor=#ffffff>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=270134516-19012001>The SQL query should have the same column order in the select statement as the order in the bitmap index or it will not use the index.</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=270134516-19012001></SPAN></FONT>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=270134516-19012001></SPAN></FONT>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=270134516-19012001>david</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=270134516-19012001></SPAN></FONT>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=270134516-19012001></SPAN></FONT>&nbsp;</DIV> <BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma   size=2>-----Original Message-----<BR><B>From:</B> Kevin Kostyszyn   [mailto:kevin_at_dulcian.com]<BR><B>Sent:</B> Monday, January 08, 2001 6:50   PM<BR><B>To:</B> Multiple recipients of list ORACLE-L<BR><B>Subject:</B> Re:   Btmap Index<BR><BR></DIV></FONT>
  <DIV><FONT face=Arial size=2>I ran into a similar problem a while back.&nbsp;   If the database is set to use the CBO, it might not use the index.&nbsp;   Someone on this list gave&nbsp;a great reason why, perhaps the table is just   very small and the CBO just decided to do a full table scan instead.&nbsp; You   could use a hint and tell it to use rule based on that query and it will use   the index on the where clause.&nbsp; That's what I did.&nbsp; The question is,   how big is the table and how much data does it have in it?&nbsp; If it is not   a lot, there really is nothing to be concerned about.&nbsp; Oh yeah, and   almost 100% positive that there is no setting in the init file for the   index.&nbsp; </FONT></DIV>
  <DIV><FONT face=Arial size=2>Sincerely,</FONT></DIV>
  <DIV><FONT face=Arial size=2>Kevin</FONT></DIV>
  <BLOCKQUOTE 

  style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">     <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>     <DIV
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>     <A href="mailto:krishna_at_nehanet.com" title=krishna_at_nehanet.com>Krishna     Prasad</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A     href="mailto:ORACLE-L_at_fatcity.com" title=ORACLE-L_at_fatcity.com>Multiple     recipients of list ORACLE-L</A> </DIV>     <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 08, 2001 5:45     PM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> Btmap Index</DIV>
    <DIV><BR></DIV>
    <DIV><FONT color=#0000ff face=Arial size=2><SPAN 
    class=953563822-08012001>Hi,</SPAN></FONT></DIV>     <DIV><FONT color=#0000ff face=Arial size=2><SPAN     class=953563822-08012001></SPAN></FONT>&nbsp;</DIV>     <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=953563822-08012001>Is     there any init.ora parameter that needs to be turned to activate bitmap     indexes?</SPAN></FONT></DIV>
    <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=953563822-08012001>I     have a bitmap index on one column C1, but when i examine&nbsp;the explain     pan of the </SPAN></FONT></DIV>
    <DIV><FONT color=#0000ff face=Arial size=2><SPAN     class=953563822-08012001>query: " select C1, b, c from table&nbsp;TT     where&nbsp;C1 in ('dd','ff')" , it looks like it is not     using</SPAN></FONT></DIV>
    <DIV><FONT color=#0000ff face=Arial size=2><SPAN     class=953563822-08012001>the index but doing a full table     scan...</SPAN></FONT></DIV>
    <DIV><FONT color=#0000ff face=Arial size=2><SPAN     class=953563822-08012001></SPAN></FONT>&nbsp;</DIV>     <DIV><FONT color=#0000ff face=Arial size=2><SPAN     class=953563822-08012001>thanks</SPAN></FONT></DIV>     <DIV><FONT color=#0000ff face=Arial size=2><SPAN     class=953563822-08012001>-krishna</SPAN></FONT></DIV>     <BLOCKQUOTE style="MARGIN-RIGHT: 0px">
      <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma 
      size=2>-----Original Message-----<BR><B>From:</B> root_at_fatcity.com 
      [mailto:root_at_fatcity.com]<B>On Behalf Of </B>Jacques 
      Kilchoer<BR><B>Sent:</B> Monday, January 08, 2001 2:01 PM<BR><B>To:</B> 
      Multiple recipients of list ORACLE-L<BR><B>Subject:</B> RE: Date 
      comparison question<BR><BR></DIV></FONT>
      <P><FONT size=2>&gt; -----Original Message-----</FONT> <BR><FONT 
      size=2>&gt; From: Lisa Yates [<A 
      href="mailto:cosnit_at_creighton.edu">mailto:cosnit_at_creighton.edu</A>]</FONT> 
      <BR><FONT size=2>&gt; Sent: lundi, 8. janvier 2001 11:27</FONT> <BR><FONT 
      size=2>&gt; </FONT><BR><FONT size=2>&gt; Why doesn't this query ever 
      return...</FONT> <BR><FONT size=2>&gt; </FONT><BR><FONT size=2>&gt; where 
      run_date = to_date('01-03-2001 16:34:59','mm-dd-yyyy </FONT><BR><FONT 
      size=2>&gt; hh24:mi:ss')</FONT> <BR><FONT size=2>&gt; </FONT><BR><FONT 
      size=2>&gt; but this query does....</FONT> <BR><FONT size=2>&gt; 
      </FONT><BR><FONT size=2>&gt; where to_char(run_date) = 
      to_char(to_date('01-03-2001</FONT> <BR><FONT size=2>&gt; 
      16:34:59','mm-dd-yyyy hh24:mi:ss'))</FONT> <BR><FONT size=2>&gt; 
      </FONT><BR><FONT size=2>&gt; and so does this query....</FONT> <BR><FONT 
      size=2>&gt; </FONT><BR><FONT size=2>&gt; where 
      to_char(run_date,'mm-dd-yyyy hh24:mi:ss') = '01-03-2001 </FONT><BR><FONT 
      size=2>&gt; 16:34:59'</FONT> </P>
      <P><FONT size=2>Well, I guess my suggestion that run_date may contain a 
      "BCE" (before common era) date was not the answer to your problem. Maybe I 
      misunderstood the issue. When you say "why doesn't the query ever return", 
      do you mean it returns zero rows, or do you mean that the query is taking 
      an abnormally long time? If it's taking an abnormally long time, an 
      explain plan on the two queries may reveal the cause.</FONT></P>
      <P><FONT size=2>Jacques R. Kilchoër</FONT> <BR><FONT size=2>(949) 
      754-8816</FONT> <BR><FONT size=2>Quest Software, Inc.</FONT> </P>
      <P><FONT size=2>8001 Irvine Center Drive</FONT> <BR><FONT size=2>Irvine, 
      California 92618</FONT> <BR><FONT size=2>U.S.A.</FONT> <BR><FONT size=2><A 
Received on Fri Jan 19 2001 - 10:50:08 CST

Original text of this message

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