Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 499339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:58:32+00:00 2026-05-13T05:58:32+00:00

how set sort_area_size in oracle 10g and what size should be as i have

  • 0

how set sort_area_size in oracle 10g and what size should be as i have more than 2.2m rows in single table. and please tell me the suggested size of SORT_AREA_RETAINED_SIZE

as my queries are too much slow they takes more than 1 hours to complete. (mostly)
please suggest me the way by which i can optimize my queries and tune the database oracle 10g

thanks


updated with query

the query is

SELECT   A.TITLE,C.TOWN_VILL U_R,F.CODE TOWN_CODE,F.CITY_TOWN_MAKE,A.FRM,A.PRD_CODE,A.BR_CODE,A.SIZE_CODE ,B.PRICES, 
       A.PROJECT_YY,A.PROJECT_MM,d.province ,D.BR_CODE  BRANCH_CODE,D.STRATUM,L.LSM_GRP LSM, 
         SUM(GET_FRAC_FACTOR_ALL_PR_NEW(A.FRM,A.PRD_CODE,A.BR_CODE,A.SIZE_CODE,A.PROJECT_YY,A.PROJECT_MM,A.FRAC_CODE ,B.PRICES,A.QTY_USED,A.VERIF_CODE, A.PACKING_CODE, J.TYPE ,'R') )  
        * MAX(D.UNIVERSE) / MAX(E.SAMPLE)   /1000000   MARKET ,  D.UNIVERSE ,E.SAMPLE  
FROM A2_FOR_CPMARKETS  A, 
     BRAND  J, 
     PRICES B,CP_SAMPLE_ALL_MONTHS C ,
     CP_LSM L, 
     HOUSEHOLD_GL D, 
     SAMPLE_CP_ALL_MONTHS E , 
     City_Town_ALL F   
WHERE A.PRD_CODE = B.PRD_CODE 
AND A.BR_CODE = B.BR_CODE 
AND DECODE(A.SIZE_CODE,NULL,'L',A.SIZE_CODE) = B.SIZE_CODE -- for unbranded loose  
AND DECODE(B.VAR_CODE,'X','X',A.VAR_CODE) = B.VAR_CODE  
AND DECODE(B.COL_CODE,'X','X',A.COL_CODE) = B.COL_CODE  
AND DECODE(B.PACK_CODE,'X','X',A.PACKING_CODE) = B.PACK_CODE  
AND A.project_yy||A.project_MM BETWEEN B.START_DATE AND B.END_DATE  
AND A.PRD_CODE=J.PRD_CODE 
AND A.BR_CODE=J.BR_CODE 
AND A.FRM = C.FRM 
AND A.PROJECT_YY=L.YEAR 
AND A.frm=L.FORM_NO 
AND C.TOWN_VILL= D.U_R 
AND C.CLASS = D.CLASS 
AND D.TOWN=F.GRP 
AND D.TOWN = E.TOWN_CODE 
AND A.PROJECT_YY = E.PROJECT_YY 
AND A.PROJECT_MM = E.PROJECT_MM 
AND A.PROJECT_YY = C.PROJECT_YY 
AND A.PROJECT_MM = C.PROJECT_MM 
 -- FOR HOUSEJOLD_GL  
AND A.PROJECT_YY = D.YEAR 
AND A.PROJECT_MM = D.MONTH 


-- END HOUSEHOLD_GL  
AND C.TOWN_VILL = E.TOWN_VILL 
AND C.CLASS = E.CLASS 

AND C.TOWN_VILL = F.TOWN_VILL 
AND C.TOWN_CODE=F.CODE 

 AND (DECODE(e.PROJECT_YY,'1997','1','1998','1','1999','1','2000','1','2001','1','2002','1','2') = F.TYP ) 
GROUP BY A.TITLE,C.TOWN_VILL,F.CODE ,F.CITY_TOWN_MAKE,A.FRM,A.PRD_CODE,A.BR_CODE,A.SIZE_CODE ,B.PRICES, 
      A.PROJECT_YY,A.PROJECT_MM,d.province,D.BR_CODE ,D.STRATUM,L.LSM_GRP , 
      UNIVERSE ,E.SAMPLE

![alt text][1]

[1]: http://C:\Documents and Settings\Hussain\My Documents\My Pictures\explain plan.jpg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:58:32+00:00Added an answer on May 13, 2026 at 5:58 am

    Check here for Oracle Documentation for SORT_AREA_SIZE. You can use alter session set sort_area_size=10000 command to modify this for the session and alter system for system. It is the same way for SORT_AREA_RETAINED_SIZE.

    Is you entire table (with 2.2 m rows) fetched in the result set? Is there some sort operation in it?

    There could be some other reasons for the query to perform badly. Can you share the query and explain plan?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of 100 photos from a 40x40m area outside in the
I have an initialize method that accepts a hash to set some instance variables.
I have this big data-entry sort of page, a table kind of layout using
I have successfully set up a WPF Datagrid with the March 2009 WPF Toolkit
I have the following SP CREATE PROCEDURE GetAllHouses set @webRegionID = 2 set @sortBy
I want to sort results set first based on one column and then based
I've been trying to set up some sort of geometry batching for a week
I'm using SlickGrid with DataView and I'm trying to set a default sort column
I'm trying to set up a custom sort behaviour for my model/view structure in
What's the best way to set up a controller to sort by many (possibly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.