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: Total beginner querying oracle tables

Re: Total beginner querying oracle tables

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Thu, 13 Feb 2003 02:31:49 GMT
Message-ID: <psD2a.78923$2H6.1013@sccrnsc04>


Lose the SFDATA. It looks like you are using sqlserver syntax of instance.database.table_name format. In Oracle you don't put the instance name in. You would put schema owner . table_name which is fine. If it's "too slow" you are doing something wrong. Try using explain plan and see what is going wrong with the query. (perhaps the tables have not been analyzed or there are not proper indexes).

I have never found downloading a whole table to my hard drive to run a report faster than running it off the server. If you don't use bind variables you could overload the server and cause a lot of CPU usage and a small number of users could cause a problem, but even running Oracle on a modest laptop I can have 5 concurrent users with a reasonably configured app. (milage will bvary based upon the application) Think about it, you are asking for the entire table, writing it to your local disk and then issuing a query against it. That has to be much slower than just asking for what you want in the first place. Think of the physics of it; you have to read from the server's disk in both cases (except the initial query, that doesn't write it to your local disk might read less info from disk and thus be faster). Then you have to drag that information over the network - again bits are bits and so moving 100K from either query is going to take the same amount of time. Then the "create local table copy" method has to write that table to disk which is inherently slower than reading from a disk(the server) vs reading from a disk(the server) and writing to a disk(your pc). Then you have to turn around and issue a query to read it off your local disk again. Ouch! No benefit from the natural caching the database provides.(other users accessing the data will cache it in ram on the server for all to access.)

Jim

--
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Bonnie R" <bonvig_at_aol.com> wrote in message
news:72187104.0302120856.4c9d374c_at_posting.google.com...

> "Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.com> wrote in message
news:<TWh2a.72846$tq4.2768_at_sccrnsc01>...
> > lost the SFDATA. in the query
> > and try that although the into testtable might not work, try just
select.
> > Why download it locally?
> > Jim
>
> There will be 5 other people using the app I'm building, running
> queries and reports. I want to download the tables locally because
> response is too slow and also because I want to code in my login and
> password for the oracle tables.
>
> I didn't understand what you meant when you said "lost the SFDATA. in
> the query"
>
> Bonnie
Received on Wed Feb 12 2003 - 20:31:49 CST

Original text of this message

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