Path: news.cambrium.nl!textnews.cambrium.nl!feeder3.cambrium.nl!feed.tweaknews.nl!195.96.0.7.MISMATCH!newsfeed.utanet.at!newsfeed.straub-nv.de!feeder1.news.weretis.net!weretis.net!news.solani.org!not-for-mail
From: Mladen Gogala <gogala.mladen@gmail.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Low cardinality,high concurrent in OLTP, how to improve query 
 performance?
Date: Mon, 2 Feb 2009 11:20:02 +0000 (UTC)
Organization: solani.org
Lines: 36
Message-ID: <gm6kt2$92v$4@solani.org>
References: <c669f2fe-e8a9-4c37-b5f5-34797f1c7f44@w39g2000prb.googlegroups.com>
 <Yi5hl.1197$Lr6.837@flpi143.ffdc.sbc.com>
 <b86addfc-833d-46be-b710-c5664b6ec984@v5g2000pre.googlegroups.com>
NNTP-Posting-Host: eJwNxEkBwDAIBEBLIbAE5HD6l9DOY8BKWk8UKlgsh/sxRUJYKBQhsf/cczHVhifXniVf/K8NZV+201W8eWqdyLZHsZreH7TYGgk=
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: solani.org eJwNyMEBADEEBMCWCJaUg9B/CXeP+YwJGO0Kg9ra1h1nFaUJrVaEw604Hp+8zSyEvHlo6NLGKPjpYW4EZ1kNRTa8tPNyzx/YiZvv7Bx5ZE0qWy/yOK259bYNPH4pMPkAtXAm5A==
X-Complaints-To: abuse@news.solani.org
NNTP-Posting-Date: Mon, 2 Feb 2009 11:20:02 +0000 (UTC)
Cancel-Lock: sha1:kN2Lf53XTeIm8ut0RyG0j5bl6O4=
User-Agent: Pan/0.133 (House of Butterflies)
Xref:  news.cambrium.nl

On Sat, 31 Jan 2009 16:10:33 -0800, krislioe wrote:

> Hi,
> 
> after :  create index idx1 on stock_summ (IS_PROCESSED,x,y,z) => still
> Full Table Scan

Of course it is. CBO will compute the number of IO requests you will need
to do and will chose the cheaper plan. That is inevitably the plan with 
the fewer multi-block reads, much cheaper then a gazillion single block 
reads.

> 
> What is other than Partition ?
> 
> Thank you,
> xtanto
>

Hash cluster. You can create a hash cluster on that column and put 
your table into the hash cluster. It will speed up your queries but
it will slow down your updates. If you update the cluster column from
'N' to 'Y', the update will copy the row from the 'N' part to the 'Y' 
part. You could also create two tables, one holding the daily data, the
other one holding the historical data. The job would then have to delete
the record in the daily table and insert it into the historical table.
That would be the classic way of doing things.
Hash cluster is, essentially, a substitute for list partitioning. You get
the table partitioned by a small list of falues from your status column, 
which will help CBO to resolve predicates using that column.




-- 
http://mgogala.freehostia.com
