SDO_RELATE slow when you use the Group of... Help, please!

Hi all

I'm pretty new on the space side of Oracle please go easy on me.

I have 2 tables (a and b), each containing line geometries. There is a one (a) to many (b) relationship between the two.

I want to write a query that selects the information of table b where geometries in table b are fully covered by the geometries in the table has, but the return info is grouped by rows in table a.

Here is my code:

Select
a.Route_ID,
a.Step,
Max (b.gritter_status),
Sum (b.salt_usage)
Of
tbl_routedirs a, tbl_routelinks b
where
a.Route_ID = b.route_id and
sdo_covers (a.geoloc, b.geoloc) = 'TRUE '.
Group
a.Route_ID, a.step

The application is extremely slow, taking up to 15 minutes to run... The thing that confuses me is the group by clause of the statement runs in less than half a second.

I checked all the indexes, etc - are all valid. I tried to re - order tables in the clause that ive read it can be a factor and certainly I have little knowledge about what to Exchange where but it seemed to have no impact on speed.

Any suggestions would be warmly welcome... Thank you.

Published by: user8760008 on August 27, 2009 07:08 - I copied the script and do not add functions of aggregation on the selected columns...

If this is the case, please try:

Select / * + leading (a) use_nl (a and b) index (your_index_on_b.geoloc b) * /.
a.Route_ID,
a.Step,
Max (b.gritter_status),
Sum (b.salt_usage)
Of
tbl_routedirs a, tbl_routelinks b
where
a.Route_ID = b.route_id and
sdo_coveredby (b.geoloc, a.geoloc) = 'TRUE '.
Group
a.Route_ID, a.step

that is to have nested loops join, then take a small table as external.
Note that you should not all three tips to get the nested loops join plan.

Tags: Database

Similar Questions

  • Error when you use the Group feature

    Oracle forms6i

    Hai

    While I compile my coding it will compile correctly, but when I tried to run I revealed an error in the function of group

    my code is


    If (NTC <>0) then
    Select the BAR code, RESPONDENT, OUTTIME today_bar, today_in, today_out from dail_att where BARCODE =: bar code
    and ATTEND_DATE =: bardate;
    Update dail_att set outtime = max(:bartime) where barcode =: bar code
    and ATTEND_DATE =: bardate;

    on the other
    If (cnt2 <>0) then

    Select RESPONDENT, OUTTIME in yest_in, yest_out from dail_att where BARCODE =: bar code
    and ATTEND_DATE =: bardate-1;

    If (yest_in is not null and yest_out is null) then
    Update dail_att set outtime = max(:bartime) where barcode =: bar code
    and ATTEND_DATE =: bardate-1;

    on the other
    insert into dail_att(barcode,intime,attend_date)
    values (: Barcode, min(:Bartime),: bardate);
    end if;
    on the other
    If: bartime between 0100 and 0630
    insert into dail_att(barcode,intime,attend_date)
    values (: Barcode, min(:Bartime),: bardate-1);

    Update dail_att set outtime = max(:bartime) where barcode =: bar code
    and ATTEND_DATE =: bardate-1;

    on the other

    insert into dail_att(barcode,intime,attend_date)
    values (: Barcode,: min (Bartime),: bardate);
    end if;
    end if;
    end if;

    while I'm trying this groupfunction it throws error while I use seen tell me how to use the Group feature and where
    to use

    Regadrs

    Srikkanth.M

    Srikkanth,

    For this you need to calculate the max outside of the update statement and then use this value in the update statement.

    The bartime is a control in the block?

    If Yes, then you need to find the max manually, and if it isn't, then you can write a sub query to find the maximum value.

    Kind regards

    Manu.

    If my response or response from another person was helpful, please mark accordingly

  • RoboHelp 8 runs slow when you use the network drive...

    I have several users at my company who improved RoboHelp X 5 RoboHelp 8. They report that when they are working on projects that are located on a network drive, RohoHelp running very slowly (which never seemed to happen before with X 5). I read on several forums that RoboHelp must be used with projects that are on the local drive, but I can't find any formal recommendation to Adobe about it, or have no explanation as to why the network drive doesn't work well, I found. At Adobe all officially commented on it, and no one knows why the performance of the network drive is bad? Is there anything that can be done to allow my users to keep using their network without the poor performance? Thanks in advance for any help you people can provide, I'm stumped.

    Hello and welcome, Robo_Newbie

    You're about to become real Robo_Oldie fast

    Your projects RoboHelp MUST live on a local drive. You can archive them on a network, but NEVER actually open and change while they are on the network.

    The two reasons most people incorrectly assume that they should be on the network is because you want to share with other authors and you want to back up in case your hard drive goes down. These are valid reasons, but it does not work because the. DPC (a cache of the Access database file) usually becomes corrupt - not to mention latency LAN-related performance problems.

    Until most of us do is either use the free RoboSource Control that comes with RoboHelp or establishing a manual routine to copy your current job to a LAN for more safety and establish a routine with the other authors who will be working on what, when.

    Sorry to break the bad news. That is the reality.

    John Daigle

    Adobe Certified RoboHelp and Captivate instructor

    www.showmethedemo.com

  • My Satellite phone is slow when you use the Internet

    Hello

    My laptop is very slow in the course using net web page browsing is not open during the search on the web. Please solve my problem.

    Respect of
    Faris

    Hello Faris

    Nobody here is a magician for your problem. If the Internet is slow, you should contact your Internet service provider and clarify it with their technical support.
    They should check your connection.

  • Adobe acrobat reader for windows 8.1 x 64 crash when you use the search function

    Software Adobe acrobat reader crashes on windows 8.1 x 64 when you use the search function. Please help it is extremely annoying

    Hi rikusg98319732,

    I will suggest you to perform a clean reinstall of the reader.

    Delete using the cleaning tool: Download Adobe Reader and Acrobat tool - Adobe Labs

    Install from here: http://get.adobe.com/reader/enterprise/

    Thank you

    Abhishek

  • Can I turn off notifications by e-mail of Echosign when you use the API

    Hello

    I am trying to create a personal widget using the EchoSign API and I noticed that EchoSign sends an e-mail to the user with the signed copy after that that they have signed.

    Is there a way I can disable all notifications by e-mail of EchoSign when you use the API?

    Please contact support, or the Manager of your success.

  • Firefox does not open after the update. Cannot open the profile technical, even when you use the directory in cmd line path

    I'm using Firefox on a Windows 7 computer. Firefox does not open after the last update. I read the help articles and it seems that I need to create a new profile because my settings were probably corrupted. I'm unable to open the profile technical, even when you use the directory in cmd line path. I tried the following commands in the command line:

    Firefox Pei
    "C:\Program Files (x 86) \Mozilla" PEI

    Nothing happens with every order.

    I am also running Norton Internet Security. I read a help of virtual navigation features Re article that can cause a problem. The article says to check the setting of virtualization in the internet security software and to clear the virtual cache. I went through all the menus of settings in Norton Internet Security version 21.6.0.32 and I don't see anything that looked like in "virtualization" settings, so I guess that does not apply to me. "

    If you have any ideas, I had appreaciate that your expertise!

    Hello arcandl, at the launch of the firefox is not after you double-click the shortcut, it is sometimes also a sign of active malware on a system.
    you might want to try running a scan with some various other security like the free version of malwarebytes and adwcleaner tools that are specialized to remove the adware and browser hijackers.

    Fix Firefox problems caused by malicious software

  • How to enter the character ü when you use the pinyin keyboard?

    How can I enter the character u when you use the pinyin-simplified keyboard, for example, for the opening of the syllable nu with your 3.

    The keyboard pinyin-simplified is for entering the characters han, not latin.  If you want to type the latin pinyin, you must use the extended ABC keyboard configuration.  A list of the shortcuts is to

    http://symbolcodes.TLT.PSU.edu/accents/codemacext.html

  • Is cell required when you use the map applications of conduct?

    Is cell required when you use the map applications of conduct?

    Yes. GPS does not work with a Wi - Fi connection.

  • WHEN YOU USE THE CONSTRUCTOR OF MY SITE, I CAN'T COPY AND PASTE WROTE THE BROWSER SECURITY SETTINGS HOW TO NOT CHANGE THESE FOR ME TO COPY / PASTE?

    WHEN YOU USE THE CONSTRUCTOR OF MY SITE, I CAN'T COPY AND PASTE WROTE THE BROWSER SECURITY SETTINGS HOW TO NOT CHANGE THESE FOR ME TO COPY / PASTE?

    https://support.Mozilla.com/en-us/KB/granting+JavaScript+access+to+the+Clipboard

    This extension will help you implement the security policies for access to the Clipboard.

    Allow the extended Clipboard support:

    https://addons.Mozilla.org/en-us/Firefox/addon/852

  • MainStage "lag" when you use the SPACEBAR as 'play '.

    Hi all, I'm relatively new to Mainstage (V3), and I'm hoping to use it for the first time this weekend to play the extra backing with a band tracks

    The issue I'm having, is that with the SPACEBAR of laptops on 'PLAY '. It is often "lag". or simply does not start the song. I have to wait a second, then hit again, it will work.  It is almost as if in Performance mode, when you use the down arrow key to select the next song, the 'focus' is on the list of patch, and if I click in the background where are playback buttons and stop, THEN that will work. I have not, however, been able to reproduce this particular behavior on a consistent basis.

    Everyone knows the same thing? Or why it is so 'all or nothing '?

    And a question important much donor... I gave all my reading titles to the waveform appropriate the other night (so I could visually see the waveforms above the attenuator as offers of backing track model), however, once I was moving songs in a different order, which stopped working. No idea why?

    Thnaks in advance

    About the offset by hitting the space bar, a thought occurred to me.

    How Mainstage allocates 44.1/16 bit wave files used in the reading plug-in? Which means, when a song is selected, which uses, for example, to separate the 5 cases of reading, one can assume that these audio files used in that song would need to "load" first.

    Anyone know if this is how Mainstage works?

  • Tecra M5 - crashes when you use the docking station - fan at full power but no start the thread

    Hi all

    As I say, I have intermittent problems where the machine crashes when you use the docking station. Sometimes at the beginning of the startup of windows then stalls and powers of fan at full power. If I take off the base of the machine, it works fine.

    I bought this machine because I had one in my previous job and he had found great. However, my only previous also had this problem sometimes when lashing...

    Any assistance received very warmly.

    Thank you!

    Hello

    Stand by. You have noticed this behavior when the laptop is OFF, connect to the docking station and after doing this you turn. Am wrong me or have I misunderstood something?

    Maybe's external screen connected to the docking station?

  • M40X-141: black screen when you use the WiFi network

    Since I bought my M40X 141 in July 2005, I got black screen frequently when you use the wifi.

    You know this black screen with typical noise from the hard drive.

    I did all the updates without effect. The local seller understood nothing black screen, associated with the use of wifi.

    In the XP world, nobody seems to find this kind of abnormal things so I'm desperate to find a solution to stop the frequent black screens. Recently try a usb dlink wifi dongle (dwl-G122) the constant flow of black screens disappeared
    (An Xp session 10 days was previously impossible).

    Now, I know this is a bug in the original software and I try desespartely to find a patch or updated driver or professional advice.

    Is there someone here who can help a tired multi restart man to use his laptop with the original material?

    Your laptop should still be guaranteed if you bought in June 2005. Take it to your authorized Service Provider nearest and have their say. They should already provide for a procedure for this and know what to do. Sure the frequency that uses WIFI and display inverter coincides, and you get the black screen. Change them should fix this problem.

  • Satellite A500-1GL: it is advisable to remove the battery when you use the network

    I know this is a silly question but its actually something I know not so thought I would ask.

    I almost always plug my laptop into the supply line (satellite a500 1gl)
    I was wondering have you actually keep the battery installed even when using the electrical network.
    Or is it really advisable to remove the battery when you use the network?
    I didn't know if the battery should always be in place.
    Thanks for your help
    Torti

    Hello

    A few years ago it was recommended to remove the battery of the laptop if the AC adapter is plugged. What keeps the constant charge battery
    New age of batteries are better you can leave the battery in the Bay it s ok and it should not affect the performance

    However, sooner or later each battery would die it s only a matter of time, you know

  • Satellite L40 crashes when you use the product recovery disc

    When you use the product recovery disc to repair my laptop it hang after language page display.

    Select meaning when it displays the language, I select language and press next, no action more far there... I can move one pointer.

    Some may help how to solve the problem.
    Thank you

    > Select sense when it displays the language, I select language and press next, no action more far there

    Perhaps, your recovery disk is corrupt. What happens if you try with Windows disk copy?

Maybe you are looking for