Multiple index scenario

Suppose I have a table that has (among other columns) the following columns:
LAST_UPDATE DATE,
CATEGORY VARCHAR(1) NOT NULL,
The statistics of the data are as follows:
- CATEGORY can only be one of 5 different values: 'A', 'B', 'C', 'D' and 'E'
- The distribution of the DATE values are pretty uniform. For instance, the number of rows in any 10-minute period is pretty much the same as any other 10-minute period.
- The number of rows for a given value of LAST_UPDATE is almost always 0 or 1. In other words, SELECT * ... WHERE LAST_UPDATE = :p1 almost never returns more than one row.
- The distribution of the CATEGORY values are roughly equally proportioned.
- There are a lot of rows in the table
I want to optimize the following queries:
A. SELECT ... FROM ... WHERE LAST_UPDATE BETWEEN :p1 and :p2;
B. SELECT ... FROM ... WHERE LAST_UPDATE BETWEEN :p1 and :p2 and CATEGORY = :p3;
Even though it generally is a mistake to ask two questions in the same forum post, here I go:
1. Will an index on (LAST_UPDATE) work better/worse/the same than one on (LAST_UPDATE, CATEGORY)?
2. Will Oracle be able to use an index on (CATEGORY, LAST_UPDATE) for the first query?
My intuition tells me that an index on (LAST_UPDATE) alone should just work as well as the multi-column index (LAST_UPDATE, CATEGORY). In fact, the multi-column index might be less performant in that it might take up more space and make Oracle do more unhelpful work.
As for #2, my understanding is that Oracle can use an index on (CATEGORY, LAST_UPDATE) for query A. It will effectively rewrite the query as a UNION:
SELECT ... FROM WHERE (LAST_UPDATE BETWEEN :p1 and :p2) AND (CATEGORY = 'A')
UNION_ALL
SELECT ... FROM WHERE (LAST_UPDATE BETWEEN :p1 and :p2) AND (CATEGORY = 'B')
UNION_ALL
SELECT ... FROM WHERE (LAST_UPDATE BETWEEN :p1 and :p2) AND (CATEGORY = 'E')
Comments?
Edited by: user10936714 on Nov 21, 2011 12:39 PM
Edited by: user10936714 on Nov 21, 2011 12:47 PM

My intuition tells me that...Why not put together a test scenario?

Similar Messages

  • How to configure one TREX host with multiple index servers ?

    Hi All,
    Does anyone know how to configure TREX on the one host,
    with multiple index servers ?
    Reason for this is to make better use of resources available on the host server(4 Gig, 4 Processor, Windows2003), to improve the search performance of
    our KM content for portal users.
    I am using TREX 7 and have not been able to do this,
    despite reading the Single and Distributed install
    documentation.
    Any help would be appreciated.
    Regards,
    Andres

    Hi Andres,
    To make use of the RAM a Server provides you have to run two indexserver processes (each can then consume 2 GB);
    Proceed like this:
    1. Go to TREXdeamon.ini; check if section [indexserver2] is there (it is already provided, but not active in standard installation)
    2. In TREXdeamon.ini go to
    [daemon]
    references sections below
    programs=nameserver,preprocessor1,indexserver1,queueserver,alertserver
    and add indexserver2 here. Restart TREX; second porcess is then started; can be checked in TREX monitor in Portal as well
    3. To distribute existing indexes to the new process, start TREXadmintool and go to Index: Landscape
    Go to the last two columns and move the indexes (move master here/secondary mouse click)
    If you don't distribute the indexes the new index server process will be regarded when an new index is created.
    Hope this helps!
    cheers
    Bettina

  • SAP CRM Multiple Backend Scenario with Solution Manager

    Dear Experts,
    We are implementing CRM Middleware - Multiple Backend Scenario (MEP / MBE Concept) in our client landscape for SAP CRM on HANA (Ehp3)
    set-up.
    And If any one of you have already implemented MEP Scenario in the SAP CRM Landscape, Could you please help us to provide with the Configuration Steps / Documents, so that we can proceed further.
    Below are the following Queries:
    For Customizing Adapter Object:
    1) Does MEP Concept support the Customizing Adapter object to download from more than one ECC System to single CRM System.
        If Yes, Could you please provide the Configuration steps or Procedure to download the customizing data.
    For Master Adapter Object:
    2) The Adapter objects for Master Data like Customer and Materials are technically supported under MEP for the data exchange.
         However, is it possible to download the Equipments Master Data from more than one ECC System to single CRM System?
         If Yes, Could you please provide the steps or Procedure to download the Equipments Master Data.
    And please provide if you have done the Solution Manager Configuration mapping for MEP Scenario, which is required for the maintenance and transfer of customizing mappings to CRM and Mapbox.
    Thanks,
    Mohanram.

    Hi Alagammai,
        We are also implementing CRM Middleware - Multiple Backend Scenario (MEP / MBE Concept) in our client landscape for SAP CRM on HANA (Ehp3) set-up.
    Required some Information on the below Query.
    For Customizing Adapter Object:
    1) Does MEP Concept support the Customizing Adapter object to download from more than one ECC System to single CRM System.
        If Yes, Could you please provide the Configuration steps or Procedure to download the customizing data.
    For Master Adapter Object:
    2) The Adapter objects for Master Data like Customer and Materials are technically supported under MEP for the data exchange.
         However, is it possible to download the Equipments Master Data from more than one ECC System to single CRM System?
         If Yes, Could you please provide the steps or Procedure to download the Equipments Master Data.
    And please provide if you have done the Solution Manager Configuration mapping for MEP Scenario, which is required for the maintenance and transfer of customizing mappings to CRM and Mapbox.
    Thanks,
    Mohanram.
    7829055537

  • Is there a way to do multiple indexes and ToCs?

    I have InDesign, CS2.  I am wondering, is it possible to do multiple indexes? For example, an index of names, a separate index for places. Similarly, is it possible to make multiple Tables of Contents? What I really want is a Table of Contents, a list of illustrations, a list of charts, and a list of maps.  What is the best way to go about this?  I realize I can make a table of contents, copy the text and use it, then change the toc settings to make a new one. So my main concern is the indexes, but I am curious if there is a better way for the tocs.
    Thanks

    The way you can do multiple indexes is by using the Symbol area of the 
    index topics and creating a separate index under different symbols. 
    You can set the alphabetic order manually. When you build the index, 
    you'll end up with separate sequences for each symbol and you then 
    just lay out each section where you need it.
    Not intuitive, but it works...
    Harbs

  • File to Multiple Idocs scenario. Pls help

    Hi All,
    For Single File to Multiple Idocs scenario i am referring blog --
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
    Suppose my source file is
    AAA, BBB,CCC
    111,222,333
    ZZZ,ZZZ,ZZZ
    I want to make 2 IDOCS for the first 2 records (AAA, BBB,CCC   and  111,222,333)
    and do not want to make IDOC for the 3rd record  -- how to achive this.
    Regards

    Hi,
    If the condition is like, for 'AAA' and '111', IDocs to be generated, then do as follows.
    If IDOCs are of same type.
    1. Value
    > Equals -
    > createIf -
    > IDOC
       Constant('AAA')
    2. Value
    > Equals -
    > createIf -
    > IDOC
       Constant('111')
    3. Value
    > Equals -
    > not -
    > createIf -
    > IDOC
       Constant('ZZZ')
    If 2 IDocs are of differnet types,
    create different mapping programs with same logic.
    If 2 IDocs are to be generated based on the record no in the file rather than the first field value, i think you can go for Global container.
    Refer these,
    [http://help.sap.com/saphelp_nw04/helpdata/en/ee/bf9640dc522f28e10000000a1550b0/frameset.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/EN/49/1ebc6111ea2f45a9946c702b685299/content.htm ]
    [http://help.sap.com/saphelp_erp2004/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/frameset.htm]
    thanks.
    Edited by: P.Ravi Varma on Apr 22, 2009 10:27 AM

  • XI-Multiple instance scenario -File & SQL sender communication channels

    Hi
       i have a basic question regarding how file sender communication channel ( where we poll for a particular file pattern either using file/ftp types in a particular subfolder ) or a sql sender communication channel - ( selecting records from a sql source ) would work in a scenario with two active XI instances and j2EE file and sql adapter services running on both of the J2EE servers ?
    1. How would the file polling from both J2EE servers - avoid a conflict looking for the same file pattern ? Is there any inbuilt mechanism from SAP to make multiple instances work with the file polling - without a confict ?
    2. Simlar question for SQL sender type communication channel ?
    If SAP does have a mechanism to handle multiple instance scenarios for file and sql sender adapter based communication channels, is there a link/document on this ?

    Hi Karthik,
    Please see my comments.
    I am just wondering aloud - what will happen if we use a select for update clause in the sql sender adapter communication channel -
    Gouri: Yes you can use select + update. In fact that is the right way.
    will this ensure that polling from one J2EE instance will lock the selected records so that the second instance does not select the same set of records from the sql server ? Or should we not use a select for update and use a simple select statement ?
    Gouri: Yes. SQL DB will ensure that same data will not be picked by another node. As I mentioned earlier use serilizable option from advanced mode.
    -Gouri

  • File-XI-multiple IDoc Scenario

    Hi there -
       I am working on single File-XI-multiple IDoc Scenario and have following questions:
    (please keep in mind that there is already an existing multiple IDocs-XI-single File scenario between the same systems)
    1. Please provide any detailed step by step documentation from end-to-end.
    2. I am thinking it's compulsory to use BPM, is there any way to aviod?
    3. Is it possible to update existing IDocs in R/3 directly from the data from XI?
    Thanks everyone in advance...
    Pat

    HI,
    Pls go thru following links-
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Single inbound file -> XI -> Multiple IDOCs in SAP
    One file for multiple IDOCs
    Hope this helps..
    Regards,
    Moorthy

  • Multiple IDOC to Multiple IDOC scenario without BPM steps????

    Hi
    Could you please give me the solution for this ???
    I want steps for sending all IDOCs at a time- ---"Multiple IDOC to Multiple IDOC scenario without using BPM".???
    thanks
    3nadh

    Hello,
    Refer the below, for certain details!
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi     ALE configuration for pushing idocs from SAP to XI
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change     XI: IDOC bundling - the "trick" with the occurance change
    Regards,
    Jilan

  • JDBC to Multiple IDOC scenario

    Dear Experts,
    My Scenario is JDBC to Multiple IDOC scenario.
    I am reading 100 records and generating 100 IDOC's at the target ECC system, the problem which I am facing is if I have any issue with 1 record the total message gets failed in SXMB_MONI due to mapping failure.
    So again I need to reset all 100 records in my source database and I should reprocess the same.
    Is there any way to process the 99 and fail only one record which causes error.
    Is Stored procedure will fix this issue or do I need to use BPM for this to achieve.
    Please advice.
    Thanks,
    --Sai

    Hi Sai,
    As you are selecting 100 records in one go, all the records will come as a single message in PI.
    Please find below my suggestion for this issue.
    1. Selecting one record per message will not be efficient. So please do not use it.
    2. Create a secondary sctucture. Generate it only if there is an error in the record. You may set up an alert for that message. So if any error occurs, other 99 idocs can go normally, while you will get an aleart for the failed record.
    3. Another option is to create an idoc for error record also. You can do this by providing some default values in place of error fields. You can then monitor such idocs in ECC.
    Personally, i feel 2nd option is the best. Let me know if you need more information on this.
    Regards,
    Gavaksh

  • IDOC to multiple header scenario..

    Hi,
    My scenario is Idoc to multiple flle scenario..(CDMA & GSM files needs to routed to differient structures)
    The requirement is Idoc is triggered at R/3 ECC side, at the target end we have 3 structures, the 1st structure is common as it has email details and the 2nd structure (CDMA structure)and the 3rd structure (GSM Structure) is differient which should handle CDMA & GSM.
    so, the IDOC triggers with the following case
    1. Only CDMA files
    2. Only GSM files
    3. Mixed CDMA & GSM files
    4. Sometimes missed data without having anyinformation to differentiate (For this case the records should not be geterated)
    Ouput should be as follows:
    for the first case:
    1. If only CDMA files -
    > In this case the output should be 2 files (one email file , CDMA text file--- so totally 2 files)
    2. If only GSM files  -
    >In this case the output should be 2 files (one email file , GSM text file--- so totally 2 files)
    3. If both CDMA & GSM -
    > Then here totally 3 output files where (One email file, CDMA text file, GSM test file -- totally 3 files)
    Please throw some light for how to proceed with this type of scenario..
    Thanks,
    --Kishore

    Hi Sarvesh,
    The reply was really useful and also can you clarify the below things,
    1. I have to drop the files by using dynamic file naming configuration i mean i have to drop the files with the name as below
    First case: If only CDMA records in the IDOC then i need to drop 2 files (1 email file -- 1 CDMA text file)
    the file names should be as : IDOCNumber_Currentdate.xml -- For email file & IDOCNumber_CurrentDate.txt for CDMA text file
    Second case: If only GSM records in the IDOC then i need to drop 2 files (1 email file -- 1 GSM text file)
    the file names should be as : IDOCNumber_Currentdate.xml -- For email file & IDOCNumber_CurrentDate.txt for CDMA text file
    Third case: If mixed CDMA & GSM records in the IDOC then i need to drop 3 files (1 email file -- 1 CDMA text file & 1 GSM text file)
    the file names should be as : IDOCNumber_Currentdate.xml -- For email file & IDOCNumber_CDMA_CurrentDate.txt for CDMA text file, IDOCNumber_GSM_Currentdate.txt)
    Here the IDOC number and the text GSM is not used in the ouput structure to use variable substitution method, when we use dynamic file naming configuration UDF then the files are getting overwritten with the first UDF.
    Please let me know how to proceed further..
    Thanks,
    --Kishore
    Edited by: Kishore Kumar N.T on Dec 10, 2010 11:33 AM
    Edited by: Kishore Kumar N.T on Dec 10, 2010 11:34 AM

  • Multiple Indexes

    It sure would be nice if you could create more than one index.  I've been working on a parts catalog for my company for some time now.  I'd really like to have an Alphabetical Index by part name and a Numerical Index by part number.  Not such an easy task with what's currently available in CS4.  I'm using some suggestions I found in the forums to place them all in one index and seperate after creating the index.  Although, this would be much easier if InDesign offered the ability to create more than one index or TOC.  Obviously I'm not the only one who feels this way based on the results after doing a search for multiple indexes.  Maybe by the time I have to update the catalog next year this option will be available??  Let's hope!

    How can we avoid full table scan and ask the optimizer(RBO) to look at the INDEX?First, you need to do an EXPLAIN PLAN on your query to see if an index is really being used. If it is, fine.
    if not, you need to see the reasons. There could be many reasons, for example, if the WHERE clause uses a
    FUNCTION (built-in or user-defined), Oracle may choose NOT to use the index. IF using a RBO, you are
    limited by your options. If using CBO, you could use HINTS to instruct the optimizer to use a specific
    index out of many available.
    Also, make sure that the columns in where clause appear in the order in which they appear in your index. Does this really matter with individual indexes on individual columns?
    Doesn't this only matter when there is a composite index on the set of columns?Yes, if you search on a group of columns more often, then it makes sense to have one index with those
    group of columns instead of having a separate index for each column, since Oracle will use only one
    of the available indexes at a time.
    For the CBO, you can enhance the performance by providing STATISTICS for the tables involved in the
    query (using ANALYZE command).
    This is no comprehensive guide on SQL tuning. this is only tip of the iceburg, and there are lot many
    other things that go along with it to make a query run faster...

  • How to Implement a Single Folder - Multiple Authors Scenario für NW 7.3?

    Hello,
    is a version "How to Implement a Single Folder - Multiple Authors Scenario" for NetWeaver 7.3 planned?
    Best regards,
    Arnold Gallemann

    Hi Detlev,
    thanks a lot for sharing your work!
    Due to the reason we need a different configuration in KM, I changed e.g. some values in the .cc.xml and .co.xml files. I rebuild the project and checked the created EAR file. I noticed that the ConfigArchive file in EAR file still has the old values. It seems that SAP NetWeaver Developer Studio 7.3 is not recognizing in a portal application project the configuration of the src.config folder anymore. To test this, I removed the initial provided ConfigArchive in the folder dist\PORTAL-INF\config\ from your project. I rebuild it and the ConfigArchive in the EAR file wasnu2019t included.
    I found in the documentation (http://help.sap.com/saphelp_nw73/helpdata/de/42/60aec0032c1422e10000000a114cbd/frameset.htm) the SAP Note 1572813, which would describe how to use KMC wizards in SAP NetWeaver Developer Studio 7.3. But the article is currently not released to public.
    In addition I have discovered, that it is possible to include the src.config folder in the build process if the project is set up as a development component (see for details bullet point Optionally of http://help.sap.com/saphelp_nw73/helpdata/de/42/60aec0032c1422e10000000a114cbd/frameset.htm). This works. But later on I am facing another problem: I am missing the entry KMC-CM to add it as a dependency for the development component.
    Best regards
    Mario

  • Single folder multiple Author scenario in KM

    Hi Every One,
           I have tried to configure Single folder multiple Author scenario in KM. i have done all configurations Given in Following document  but i haven't Succeeded. Please help me Out.
    Configuration Document like:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f74d7c0-0d01-0010-50b1-9810a1584b00
    Regards
    Sridhar.

    Hi All,
    Sorry for the previous post. Let me explain the scenario in brief..
    We need to upload a document to a particular folder in KM and assign Permissions to the same. Say For example, we have 100 users and a admin user. The uplaoded file by a user should not be viewed by other 99 users, the admin & the user who uploaded the doc can have full control over it.  Similarly the case should be generated for the other 99 users.
    We tried to uplod the document and assign permnissions manually. But i know this is not the best way to approach this requirement.
    What should be the best solution to assign permissions to the uploaded document?
    Regards,
    Sridhar

  • Need to create multiple indexes - will this work?

    For a catalog of about 350 pages, I need both a manufacturer index and a product index. I have read some of the creative solutions already posted here and in other web discussions, and I have an idea.
    Why not create two Book files? one could be "Catalog-Product.indb" and the other could be "Catalog-Manufacturer.indb". Basically two separate contexts for the series of layouts. When in the Product book, do all the indexing for that context, update the Product index and close the set of files (saving the Catalog-Product.indb as well and then closing it). Then open the Catalog-Manufacturer book and do the indexing for the Manufacturer index, generate it, save and close.
    The question is: will each of the two book files be able to ignore the invisible index metadata that belongs to the other book when generating the index? will there be trash index entries in the Index palette - representing those of the other book file? Or, can these two sets of metadata be properly kept separate?
    One consequence that I predict is that the Hyperlinks option during PDF Export from InDesign will be compromised - I would expect whichever book was inactive during the PDF export from the Book file would be the one whose index links would be non-functional.
    Can anyone tell me though whether this strategy could generate two proper indexes at least for a print document?

    Bill Planey wrote:
    For a catalog of about 350 pages, I need both a manufacturer index and a product index. I have read some of the creative solutions already posted here and in other web discussions, and I have an idea.
    Why not create two Book files? one could be "Catalog-Product.indb" and the other could be "Catalog-Manufacturer.indb". Basically two separate contexts for the series of layouts. When in the Product book, do all the indexing for that context, update the Product index and close the set of files (saving the Catalog-Product.indb as well and then closing it). Then open the Catalog-Manufacturer book and do the indexing for the Manufacturer index, generate it, save and close.
    The question is: will each of the two book files be able to ignore the invisible index metadata that belongs to the other book when generating the index? will there be trash index entries in the Index palette - representing those of the other book file? Or, can these two sets of metadata be properly kept separate?
    One consequence that I predict is that the Hyperlinks option during PDF Export from InDesign will be compromised - I would expect whichever book was inactive during the PDF export from the Book file would be the one whose index links would be non-functional.
    Can anyone tell me though whether this strategy could generate two proper indexes at least for a print document?
    Hi, Bill:
    Search Google for terms like "InDesign multiple index" without quotes. There are some good links for this; admittedly they're workarounds. If you take the time to file a formal request for this feature at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform, there's a chance the developers will eventually run out of excuses or higher-priority tasks, and include it in a future release.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Role of clients in CRM Multiple Backend Scenario

    Does the CRM Multiple Backend Scenario only apply to a single client pointed to multiple CRM or ERP systems.
    All the relevant tables are client dependent in CRM 2007 and the client independent ones use logical destinations which can easily be pointed todifferent clients.
    We want to point different clients on a CRM or ERP system to multiple back ends, but each client will only have a single client that it points to.
    For example
    CRM (dev) client 100 is connected to ERP (sandbox) client 100
    CRM (dev) client 200 is connected to ERP (dev) client 100
    CRM (test) client 100 is connected to ERP (qa) client 100
    CRM (qa) client 100 is connected to ERP (qa) client 200
    This will only be in the development and qa systems. Production will be a single system and client on each side.
    Regards,
    Aubrey Smith

    Aubrey,
    Development will happen in only one client system. This can later be moved to Quality and further to production. All customization will also be moved same way. It may also happen that your development is cross client so if you do development on 100 , it will be available on 200 client as well.
    Regards,
    Harshit

Maybe you are looking for

  • Can I Export from my Mac/iMovie to a Flashdrive Camcorder to TV?

    Hi. I've never used a HD camcorder before or edited with HD (only MiniDV camcorders and SD editing).I'm considering purchasing a HD camcorder with internal flashdrive and SD slot to use with iMovie.If I do so I'm wondering ----after I've completed ed

  • Which battery packs are compatible to the one in Satellite A50-110?

    Dear all, I have a Satellita SA50-110 and realise that I need to urgently replace the battery pack, and of course I would like to upgrade, if I already have to invest, from 4400mAh to maybe 6600 or even 8800mAh. However, when I browse the various onl

  • I have a few questions about 5th gen ipod

    My iPod has a very sluggish transfer rate for my music and I wanna connect it with the firewire cable I got with my old mini. When I do I get a message saying it's not supported on the ipod. Does anyone know if that is just me or if there is a firmwa

  • Warning Event ID 6006 & 6005 and Information Event ID 6000 & 6003

    Warning Event ID 6006 & 6005 and Information Event ID 6000 & 6003 Hi, Would greatly appreciate if someone can advise me on the following warning & info event id I keep getting: I am running two AD (Std 2012) on two hyperv servers.  Noticed the events

  • Explorer crashes frequently on two Windows 7 64 machines

    Hi, I have two users on the network who are experiencing frequent crashes of Windows Explorer.  In all cases the crashes are being caused by invalid write   I have been collecting crash dumps and trying to analyze them in Visual Studio 2013, but with