Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: VB.net front end / slow queries
Sybrand,
Was your reply an attempt at wit, or sarcasm? It's so hard to tell with some technical people, since so many of us think we possess a higher form of intelligence than the rest of humanity... I'll choose to assume you were trying to be witty!
Here is the code for the view:
CREATE VIEW view AS
a.field1, a.field2, a.field3, a.field4, a.field5, a.field6, a.field7,
, sum(case when b.field2 ='A'
then b.field3 else 0 end) as A
, sum(case when b.filed2 ='B'
then b.field3 else 0 end) as B
, sum(case when b.field2 ='C'
then b.field3 else 0 end) as C
, sum(case when b.field2 ='D'
then b.field3 else 0 end) as D
, sum(case when b.field2 ='E'
then b.field3 else 0 end) as E
, sum(case when b.field2 ='F'
then b.field3 else 0 end) as F
, sum(case when b.field2 ='G'
then b.field3 else 0 end) as G
, sum(case when b.field2 ='H'
then b.field3 else 0 end) as H
, sum(case when b.field2 ='I'
then b.field3 else 0 end) as I
, sum(case when b.field2 ='J'
then b.field3 else 0 end) as J
, sum(case when b.field2 ='K'
then b.field3 else 0 end) as K
, sum(case when b.field2 ='L'
then b.field3 else 0 end) as L
, sum(case when b.field2 ='M'
then b.field3 else 0 end) as M FROM TABLE1 A LEFT JOIN TABLE2 b ON a.field1 = b.field1 WHERE a.field5 ='something' GROUP BY a.field1, a.field2, a.field3, a.field4, a.field5, a.field6, a.field7
The query in the VB.net code is a simple select statement from the view to display the data to the end user.
I don't have the execution plan.
-- Message posted via http://www.oraclemonster.comReceived on Thu Feb 24 2005 - 13:57:46 CST