Using multiple Collections in Report queries

I am using many collections in my Report Queries (where conditions) to create the XML needed for running reports (see where condition below). I name each one with a different collection name. I am seeing some performance issues and it looks like it has to do with the amount of collections I am using. It looks like after around 6 collections used in the query, the sql slows down tremendously. It doesn't matter which ones I use, so it doesn't seem to be a specific one.
Are there issues with using many collections? Should I try using 1 collection and add an identifier to one of the collection columns instead?
where ...
and C.FK_SCHOOL IN (SELECT c001
FROM apex_collections AC1
WHERE AC1.collection_name = 'SIS_REPORTS_SCHOOLS')
and nvl(C.ACTIVE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C.ACTIVE,'NONE'),C001)
FROM apex_collections AC2
WHERE AC2.collection_name = 'SIS_REPORTS_ACTIVES')
and nvl(C5.CALENDAR_NO,'NONE') IN (SELECT decode(c001,'NONE',nvl(C5.CALENDAR_NO,'NONE'),C001)
FROM apex_collections AC3
WHERE AC3.collection_name = 'SIS_REPORTS_SCHOOL_CALENDAR_NOS')
and nvl(C10.CLUSTER_CODE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C10.CLUSTER_CODE,'NONE'),C001)
FROM apex_collections AC4
WHERE AC4.collection_name = 'SIS_REPORTS_CLUSTER_CODES')
and nvl(C4.EMPLOYEE_NUMBER,'NONE') IN (SELECT decode(c001,'NONE',nvl(C4.EMPLOYEE_NUMBER,'NONE'),C001)
FROM apex_collections AC5
WHERE AC5.collection_name = 'SIS_REPORTS_COUNSELORS')
and nvl(I3.DISTRICT,'NONE') IN (SELECT decode(c001,'NONE',nvl(I3.DISTRICT,'NONE'),C001)
FROM apex_collections AC6
WHERE AC6.collection_name = 'SIS_REPORTS_DISTRICTS')
and nvl(A1.ETHNIC,'NONE') IN (SELECT decode(c001,'NONE',nvl(A1.ETHNIC,'NONE'),C001)
FROM apex_collections AC7
WHERE AC7.collection_name = 'SIS_REPORTS_ETHNICS')
and nvl(C2.GRADE_LEVEL,'NONE') IN (SELECT decode(c001,'NONE',nvl(C2.GRADE_LEVEL,'NONE'),C001)
FROM apex_collections AC8
WHERE AC8.collection_name = 'SIS_REPORTS_GRADE_LEVELS')
and nvl(C3.HOMEROOM,'NONE') IN (SELECT decode(c001,'NONE',nvl(C3.HOMEROOM,'NONE'),C001)
FROM apex_collections AC9
WHERE AC9.collection_name = 'SIS_REPORTS_HOMEROOMS')
and nvl(C9.PROGRAM_CODE,'NONE') IN (SELECT decode(c001,'NONE',nvl(C9.PROGRAM_CODE,'NONE'),C001)
FROM apex_collections AC10
WHERE AC10.collection_name = 'SIS_REPORTS_PROGRAM_CODES')
and nvl(E2.S_TYPE,'NONE') IN (SELECT decode(c001,'NONE',nvl(E2.S_TYPE,'NONE'),C001)
FROM apex_collections AC11
WHERE AC11.collection_name = 'SIS_REPORTS_SCH_TYPES')
and nvl(A.SEX,'NONE') IN (SELECT decode(c001,'NONE',nvl(A.SEX,'NONE'),C001)
FROM apex_collections AC12
WHERE AC12.collection_name = 'SIS_REPORTS_SEXS')
and nvl(C7.SPECIAL_ED,'NONE') IN (SELECT decode(c001,'NONE',nvl(C7.SPECIAL_ED,'NONE'),C001)
FROM apex_collections AC13
WHERE AC13.collection_name = 'SIS_REPORTS_SPECIAL_EDS')
and nvl(A.STUDENT_ID,'NONE') IN (SELECT decode(c001,'NONE',nvl(A.STUDENT_ID,'NONE'),C001)
FROM apex_collections AC14
WHERE AC14.collection_name = 'SIS_REPORTS_STUDENTS')
and A.PK_ID IN (SELECT decode(c001,'NONE',A.PK_ID,AC16.FK_STU_BASE)
FROM student_list_det AC16, apex_collections AC15
WHERE AC15.collection_name = 'SIS_REPORTS_STUDENT_LISTS' and
AC16.fk_student_list (+) = AC15.c001)

Hi,
APEX_COLLECTIONS are special structures that do not have indexes, expect for the one on SEQ_ID. The result is that as the number of collections used in a query increases the number of full table scans on underlying tables kill speed. They are not intended for such heavy use as has been discussed in some of the threads in this forum.
They are extremely useful , but no good for very large data sets or large number of joins. Global temporary tables are also not an option with Apex.
You may have to resort to Materialized Views or intermediate/temp tables to get speed.
Regards,

Similar Messages

  • Using Apex collection, IR report never refreshes

    I am using IR report with Apex collections. It never gets refreshed. I've to manually refresh it using browser refresh. I do have a boarderless region template for the IR report. How can I fix it?

    I am using the following plsql to create apex collection:
    DECLARE
    l_col VARCHAR2 (10) := 'SEARCH';
    l_sql VARCHAR2 (4000);
    BEGIN
    IF apex_collection.collection_exists (l_col)
    THEN
    apex_collection.delete_collection (l_col);
    END IF;
    l_sql :=
    'SELECT srv_sys_name,ddb_dbname
    FROM healthcheck.isac_search_master
    WHERE 1 = 1';
    IF :p7_shv_swcname IS NOT NULL
    THEN
    l_sql := l_sql || ' and shv_swcname = ''' || :p7_shv_swcname || '''';
    END IF;
    IF :p7_shv_businessclustername IS NOT NULL
    THEN
    l_sql :=
    l_sql
    || ' and SHV_BUSINESSCLUSTERNAME = '''
    || :p7_shv_businessclustername
    || '''';
    END IF;
    apex_collection.create_collection_from_query (p_collection_name => l_col,
    p_query => l_sql );
    END;
    I am using this collection on various pages. It works fine from first(collecton) page to next page, but I am not able to use collection on the third page. It works if I manually refresh it. Please help me.

  • Using Multiple Charts in Report

    Hi everybody,
    I inserted 3 charts in report that are based on different queries. In Report Layout and in Graphic Layout they have the same size. When I run this report these charts change their sizes depending on parameters I am using in queries (Third chart even does not appear). If somebody know how to solve this problem, please help.
    Thanks in advance.
    Galina
    null

    Hi All,
    I am also facing the same problem. When I download to Powerpoint, its getting downloaded properly and whn I download to excel, I am not able to download properly. I have 2 charts of the same report being displayd sde-by-side and under them I have a pivot table displayed in compound view. When downloaded to excel, the first chart is overlapping on top of the report in the excel.
    Can anyone suggest if we have any options?
    Thanks Shravan

  • Problem using multiple collections in web gallery

    I have a web gallery in LR5 that I created in LR2. It consists of four collections with individual titles. When I try to include the titles using the right-hand panel in the web module, when I change the title of one collection, all four collection titles change to that title. I can't give the collections individual titles. I'm using Mountain Lion on an iMac. I didn't have this problem in LR2 and LR3 but I have ever since I upgraded to LR5. Am I doing something wrong?

    Hi,
    APEX_COLLECTIONS are special structures that do not have indexes, expect for the one on SEQ_ID. The result is that as the number of collections used in a query increases the number of full table scans on underlying tables kill speed. They are not intended for such heavy use as has been discussed in some of the threads in this forum.
    They are extremely useful , but no good for very large data sets or large number of joins. Global temporary tables are also not an option with Apex.
    You may have to resort to Materialized Views or intermediate/temp tables to get speed.
    Regards,

  • Using multiple collections on one page.

    I have three collections TRIP, CATCH, EFFORT.
    I am trying to have them all on one page as three separate tabular forms.
    Do I understand this correctly, regardless of how many collections on a page, I can only use a total of 50 columns.
    So, TRIP can reference c001...c030
    EFFORT c031..c040
    CATCH c041...c050

    I have three collections TRIP, CATCH, EFFORT.
    I am trying to have them all on one page as three separate tabular forms.
    Do I understand this correctly, regardless of how many collections on a page, I can only use a total of 50 columns.
    So, TRIP can reference c001...c030
    EFFORT c031..c040
    CATCH c041...c050

  • Generating report queries

    We recently upgraded and we use GR55 to generate report queries used in our financial reports. We are not sure which report groups we need to regenerate and we want to avoid regenerating all of them because for sure not all of these are in use. The way for us to identify if they are in use is to check if the query is attached to a transaction code that will run the query.
    Is there a way for us to check if a report group is used with a customized transaction code?

    check this Re: how to save pdf in APEX 3.0

  • Cross tab data is getting multiplied if i use multiple queris in asingle report

    HI,
      i am using multiple queris for displaying data and graphs(charts).
      my requirement is to display 2 charts and data in crosstab in a single report.
      all the three thing (2charts and crosstab) will use diffrent values.
    I am writing 3 sql queries for getting appropriate values for charts and crosstab.
      Now the problem, both charts and crosstab are taking the values of all 3 queris
    i.e if i added crosstab  first to the report values are coming correctly. After  that if i add graph cross tab values are getting changed and graph values are not getting properly.
    if i add graph first then its coming correctly.
    if i tried to add all 3 components then values are going cores...... ?

    When you say you are writing 3 sql queries what do you mean? Are you creating 3 SQL command objects in the database expert? If so this is your problem, Crystal will pull a cartesian product through (this is every possible combinatin of rows from the 3 queries).
    If your 2 graphs and 1 crosstab are based on different datasets the way to approach this is to create each on a seperate report, then create a new blank report and add each of your 3 reports as subreports in the report footer.
    Hope this helps,
    Toby

  • Can we use multiple queries on one template

    Can we use multiple queries on one template

    Hi,
    if you're using data templates for your data set, you
    can put multiple queries in the XML data template.
    The queries may then be linked (or not) by the "link
    name" tag ...
    Grtz.Following you answer here...do you know eventually how/if possible to preview a report (with XMLP Desktop) that is using data templates for the data set?
    Thanks,
    Liviu

  • Join multiple fact tables and dimensions and use all tables in report issue

    Hi,
    I have a report requirements and need to use multiple fact tables and unconformed dimensions as described below
    Fact table: F1,F2,F3
    Dimensions tables: D1.....D9
    F1:(joined to) D1,D2,D3,D4
    F2::(joined to)D1,D2,D5,D6
    F3::(joined to)D1,D2,D7,D8
    D7::(joined to)D9,D8 (dimension D7 joined to two other dimensions D9 and D8
    I'm trying to use columns from almost all the fact and dimension tables but getting "Unable to navigate requested expression. Please fix the metadata consistency warnings."
    Repository is consistent and no errors and warnings.
    How can I configure the repository to develop reports using all fact tables and dimensions?
    Appreciate for your help.
    Thanks
    Jay.
    Edited by: Jay on Feb 9, 2012 4:14 PM

    So you want me to convert snowflake schema to star. does it solve my problem? individual star queries are working find but when I query multiple stars together getting inconsistency errors. I removed content tables dim level totals for unconformed dimensions in logical fact LTS and set level for measures at total level for unconformed dimensions. it is still in progress and need to test.
    Thanks
    Jay.

  • Report Queries - Multiple Source queries - One source returns & one doesn't

    Hi Folks.
    Odd one here.
    I have a report query entry in the Shared Components of the APEX UI.
    Within the Query are two source queries.
    Both return unique column names.
    Both use the same bind variable.
    When generating a PDF using the call to the report, the data from one query is being returned and the data from another is not.
    I have generated a sample XML file from APEX which is populated with data for both queries.
    If I import this into MS-Word using the BIP plugin and generate a preview all is fine. All fields using data from both source queries are populated.
    When generated via a regular call within APEX it simply does not work. I only get the data from one query.
    Does anyone have any suggestions?
    Anyone had a similar thing?
    Any comments/suggestions welcome.
    Many thanks
    Dogfighter.
    Message was edited by:
    Dogfighter
    Message was edited by:
    Dogfighter

    Hi Marc
    Does this make sense to you?
    I have now set up a simple report query and report layout.
    The record ID is hard coded into the query so that it only returns one row.
    I am using an RTF based template.
    If I navigate to Shared Components > Report Queries > Edit Report Query and then press the 'Test Report' button it runs perfectly.
    If I copy the 'Print URL:' value from this page and use it as the URL target on any page in the app. it also works perfectly.
    If I try and execute the following...
    update invoice_summary
    set invoice_pdf = APEX_UTIL.GET_PRINT_DOCUMENT (127, -- App ID
    'TEST_INVOICE', -- query name
    'TEST_INVOICE') -- layout name
    where invoice_summary_gsm_id = a.INVOICE_ID;
    I get the pdf saved to the BLOB column with the field labels in place but no data.
    Three ways of running the report.
    Two of them work perfectly but the one I want (generate direct into BLOB column) does not. Why would the exact same report query & report layout work with the other two methods but not the GET_PRINT_DOCUMENT route?
    It's not as if the pdf does not get into the BLOB column, it does, but it only has the labels and no values.
    Any ideas?
    Simon.
    PS. I only have one report query and one report layout set up so as to avoid confusion. Both with the same name.
    Message was edited by:
    Dogfighter

  • Can i use the same advertisement to multiple collections?

    Can i use the same advertisement to multiple collections?
    Advertisment A1 currently linked to collection C1.
    Can i use the same advertisement A1 to a collection C2? Because my collection C1 is query based and the C2 would be a static one.
    If i use the same A1 advert, will it affect the earlier linked C1 collection i any ways?
    System Security analyst at CapG

    Well, in 2007 you actually kind of can. You can used linked collections to make C2 a linked sub-collection under C1 and ensure that the advert applies to sub-collections.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How to use a Web Template with queries from multiple BW Systems?

    Hi all,
    can anybody help me how to use a Web Template with queries (DATA PROVIDER)in it from multiple BW Systems?
    Thanks in advance, best regards
    Frank

    Great! Thanks for the quick response.
    Have you tried this for XMLA datasources created within the EP system also?
    i.e use Web Analyzer to create a view from the XMLA source and use that view within WAD?
    Thanks.

  • How to generate a single report  using multiple Databases

    Hi All
    Is it possible to create a single report using multiple databases
    I am working on Database A to generate reports usually,, but now i have a second database for which the data is coming from flat files now i have to use few tables from
    Database B to generate a single report,,,,, can any one help with the process

    Hi,
    i didn't see this properly in your post:
    but now i have a second database for which the data is coming from flat files if you have ETL then make flat files as source then create target tables in db:B itself.. .Now, import them in the rpd..
    If not, import both those tables into rpd with different connections..
    Create physical joins by selecting those tables and perform joins operations over db's in physical layer..

  • Report Queries and collections

    Hello!
    I want to intergrate a collection query into the report query for pdf-printing.
    (Home>Application Builder>Application 111>Shared Components>Report Queries>Edit Report Query)
    I trigger the report generation by a submit button. Wheras the collection content is visable in any page it is not within the report query.
    What do I do wrong?
    Thanks
    Dietmar

    Hi John!
    Thank you for your reply!
    The query looks like:
    select ordername, ...., ...
    from v_odetails
    where O_ID in (select c001 from apex_collections where collection_name = 'PRINTLIST')
    The collection is filled with ids of orders the user has selected.
    It seemed that session information is not available.
    But, surprise, now, after a few logins it works perfectly.
    Thank you!
    Dietmar
    Edited by: DiWiNe on 25.02.2010 19:34

  • When using BW Bex query analyzer users cannot change reporting queries ....

    Issue: When using BW Bex query analyzer users cannot change reporting queries. Any attempt to change queries results in errors.
    Error: BEx Query Designer: Run-time error '-2147221499 (80040005) Fatal Error - Terminating
    Impact: Business reporting is currently being negatively impacted because users cannot modify queries, cannot change filters for fiscal period and fiscal year.
    OS / MS Office Suite being used: Vista & Office 2007
    Backend System: BW 2.0B
    Frontend System: Being a large organization, we have a controlled environment wherein all users will have the following applications installed by default:
    1. SAP Client Base 7.10
    2. SAP BW 3.5 Patch 4
    3. SAP BI 7.10 Patch 900
    4. SAP GUI 7.10 Patch 12
    Does anyone has any idea as to why we are getting this error? Is it a Vista issue? Is it a front-end issue?

    Just a thought - did you guys apply any Microsoft security patches before this started happening - we had a similar issue in other SAP application due to MS security update. Raise an OSS with SAP

Maybe you are looking for