Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: VB.net front end / slow queries

Re: VB.net front end / slow queries

From: Ann via OracleMonster.com <forum_at_OracleMonster.com>
Date: Thu, 24 Feb 2005 19:57:46 GMT
Message-ID: <a0379be49db64bc29d25a289260d88aa@OracleMonster.com>


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.com
Received on Thu Feb 24 2005 - 13:57:46 CST

Original text of this message

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