Oracle recursive performance prompt

Source: Internet
Author: User

Oracle uses recursive performance prompts that when you use start with connect by nocycle prior for Recursive data search, www.2cto.com, then the performance of the following two sections of code must be significantly different. Please note that the Code does not look at the following to view my summary // query the number of layers in A folder ID = 12 and the number of files: for the relationship between files B: For the file in the folder positive solution: www.2cto.com select count (0) cou, max (levels) + 1 as levels select C. a1, C. a2, C. levels... from (Select. a1,. a2, level levels // hierarchy from A where. a1 =, and. a2 = .... start with. a1 = 12 connect by nocylce prior. ID =. parentID) C left join B on C. file ID = B. file ID and C. file type = folder error: select count (0) cou, max (levels) + 1 as levels select C. a1, C. a2, C. levels... from (Select. a1,. a2, level levels // hierarchy from A left join B on C. file ID = B. file ID where C. file type = folder and. a1 =, and. a2 = .... start with. a1 = 12 connect by nocylce prior. ID =. parentID) C the difference between the above Code is that www.2cto.com is the correct way: First recursively loop out all the folders under a folder and the wrong way to find the file content in the associated file table is: first, find the folder and file under a folder, and then recursively loop out all the folders and files in the folder under it. This causes the redundant data after association to be cyclically recursive. it has nothing to do with the file. Shouldn't it? The file is also put in recursion.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.