Bambi,

    There are times when I really don't like people using a view to do complex
queries.   I'll give you an example of one PIG I have, although I'll re-write it
to just provide the idea of what they did.  The original definition is claimed
by the vendor as "proprietary".  Anyway, here is the basics of what their doing:

create view oops as
select a.name, b.dept, c.value
from (select name, empid, deptid from emp group by name, empid, deptid) a,
     (select deptid, dept_name from dept group by deptid, dept_name) b,
     (select empid, sum(value)value from sales group by empid) c
where a.empid = c.empid
  and a.deptid = b.deptid
group by a.name, b.dept, c.value;

Got any idea what this does to the database?  Of course I forgot to mention that
each of thise dynamic tables has a corolated subquery + other stuff built in as
well.  The vendor claims that this runs very well in their test database, which
it does (total space = 128Kbytes of disk, the tables have < 10 rows each). 
Problem is that in our production database which has 1.5GB of disk space (1 row
in test = 50 rows in production or more) in active use it runs really badly.

Dick Goulet

____________________Reply Separator____________________
Author: "Bellows; Bambi" <[EMAIL PROTECTED]>
Date:       2/21/2002 9:38 AM

If you're using views properly, they're wonderful and allow a phenomenal
amount of flexibility to the designer, but like all powerful beings, they
must use their power for good (complex query manipulation) rather than evil
(resource hogging).

HTH,
Bambi.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bellows, Bambi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to