Re: using single table costing more than using JOINS

From: <sybrandb_at_hccnet.nl>
Date: Tue, 07 Aug 2007 22:59:19 +0200
Message-ID: <lumhb3tla7qjli3p154plrfkkl3ef6cfb3_at_4ax.com>


[Quoted] On Tue, 07 Aug 2007 09:49:21 -0700, Aravindh <knaravindh81_at_gmail.com> wrote:

>Hi,
>
>I have a large table called as JP_HISTORY_TBL. This has about 10
>million rows.
>I did a select * from jp_history_tbl where assigned_to_pg_new =
>'IS00000025'
>
>It did a full table scan and the cost is 10085
>
>Now I joined the JP_HISTORY_TBL with another table called as
>ps_rf_provider_grp TABLE. This table when joined brings down the cost
>and the time of execution drastically
>
>select * from jp_history_tbl a,ps_rf_provider_grp b where
>a.assigned_to_pg_new = 'IS00000025' and a.assigned_to_pg_new =
>b.provider_grp_id
>
>It brings down the Cost drastically to just 83..
>
>Then I am totally CONFUSED of why we should create a flattened table
>to store all the data. We are in the process of creating a flattened
>table which will contain the description (which is there in the
>PS_RF_PROVIDER_GRP table).. Now looking at the above cost we feel that
>our approach itself it totally illogical and IRRELEVANT.
>I want to know how ppl are designing big big warehousses with immense
>amount of flattened data...

Just curious: why do you think reposting will get you better answers? This is the second time you post this in the wrong group and the second time without version and WITHOUT EXPLAIN PLAN results!!

Why do you insist on calling out for crystal balls?

Next time: please either post with sufficient details, or (in the event that is asked to much, as you don't have a problem with people wasting their free time with helping you out for free) better still: don't post at all, and go to Oracle Technical Support. At least those monkeys are getting paid to address your query, and having you submit evidence for months.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Tue Aug 07 2007 - 22:59:19 CEST

Original text of this message