Re: Oracle help needed

2007-02-20 Thread Russel Madere
Yes, that is how I got the original query down to 2 hours. When I started it ran 3 times as long and indexes were what helped the best. I will look at the materialized view. It will probably help. Hitting 5 or 6 flat tables or equivilents will be faster than all of the subqueries, etc. >Look

Re: Oracle help needed

2007-02-20 Thread Deanna Schneider
Look into materialized views. Basically, they're like views, but instead of doing a query every time to populate the data, it's snapshot data. You can schedule a refresh of the views, so that the data stays"in sync" as much as is reasonable. But, it should theoretically speed up your queries. Have

Re: Oracle help needed

2007-02-20 Thread Russel Madere
I'm actually trying to replace a number of views. The views are slowing down a massive query. This query takes nearly 12 hours to execute right now. Before I added a view (to find the network district instead of the regular district) the query ran in about 2 hours. This is reasonable because

Re: Oracle help needed

2007-02-20 Thread Deanna Schneider
I've not really had much need to use temp tables. So, I don't know a lot about them. But, they're either session or transaction specific (depending on how you create them). Are you doing something in PL/SQL? Cause there's also pl/sql tables that you could look into. There's also materialized and

Re: Oracle help needed

2007-02-20 Thread Russel Madere
So Oracle Temp tables are similar to ANSI standard SQL cursors. Do the temp tables continue to exist, empty, between sessions or transactions? Or do they need to be created at the start of each session or transaction? >Ah, yah, you don't want a cursor, then - if you want to select from it >aga

Re: Oracle help needed

2007-02-20 Thread Deanna Schneider
Ah, yah, you don't want a cursor, then - if you want to select from it again like that, you probably want a temp table. Here's some info about those: http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg03sch.htm#7794 On 2/20/07, Russel Madere <[EMAIL PROTECTED]> wrote: > I tri

Re: Oracle help needed

2007-02-20 Thread Russel Madere
I tried this. This is what I tried: CURSOR cur_NetworkDisticts IN SELECT * FROM paTable p FULL OUTER JOIN ntkwDistable n ON p.cl1 = n.cl1; SELECT * FROM cur_NetworkDistricts WHERE c2 IS NOT NULL; The error I get is that the object cur_NetworkDisticts can not be found. In MS Foxpro and MS SQL,

Re: Oracle help needed

2007-02-19 Thread Deanna Schneider
There's lots of ways to do it. Depends on what you're trying to do. You can do simple cursors by doing something like so: CURSOR myCursor IS Select * FROM mytable; On 2/19/07, Russel Madere <[EMAIL PROTECTED]> wrote: > Can someone point me to a web based tutorial on how to create and user

Oracle help needed

2007-02-19 Thread Russel Madere
Can someone point me to a web based tutorial on how to create and user cursors in Oracle? In MS FoxPro I could use the cursor name like a table name, but can't figure that out in Oracle ~| ColdFusion MX7 by AdobeĀ® Dyncamically