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: To many cursors.. runtime problem

Re: To many cursors.. runtime problem

From: Ryan Gaffuri <rgaffuri_at_cox.net>
Date: 23 Dec 2003 07:24:06 -0800
Message-ID: <1efdad5b.0312230724.5b515c7e@posting.google.com>


"Filiz Duman" <none_at_aol.com> wrote in message news:<bs92u5$aji$1_at_visp.bt.co.uk>...
> Hi,
>
> I am doing some ORACLE web applications programming (PLSQL, package
> programming e.g.body/spec) and creating JavaScript code dynamically using
> cursors in order to do the client site validation. (.e.g. reading values out
> of the database and fill drop down boxes within a web page and checking
> dependencies between drop down boxes, refreshing the web page if a specific
> element is selected in the dropdown box which effects the content of other
> boxes (altogether around 15 boxes)).
>
> In order to do this I have to run multiple cursors.
> The only problem I am now facing is that it takes quite a while to reload
> the web pages because of the cursors. I have set the indexes correctly in my
> tables, but still it did not effect the time of reloading.
>
> Any ideas or suggestions in order to rebuild my pages quickly ?
>
> Thanks.

#1. are you using bind variables? if not. or if you dont know what they are go to asktom.oracle.com and search for it. Stop and then read the rest of what im type.
#2. your design is bad. when running cursors and doing stuff with them, you are doing your work iteratively. this is always slower than straight sql. Plus you are using alot of them.

#3. I dont like your approach. Why do you need to run these cursors when you reload the page? I think its best to check validation only when you go to store data in the database. Occasionally its useful to use a validation on a specific field(ie you have alot of fields to change, who wants to change all of them if one of them is wrong). however, you seem to be running your validation way too much. Look at your design and your approach. your doing more work than necessary. Received on Tue Dec 23 2003 - 09:24:06 CST

Original text of this message

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