Frequent index synchronization for table with a lot of data

Hello! I have a table with text column to be indexed. There are a lot of records in the table and the texts in the text column are ofter big enough. The number of records are rising frequently and i need actual search results in any time, so i cant synchronize index 1 or 2 times per day, i need to do it after every insert and i also need to base table not to be locked in anytime i synchronizing index.
So i read the documentation and find a way for me like that:
after every insert on base table do:
ctx_ddl.sync_index('my_index')
And seems like i need to make ctx_ddl.optimize_index() after synchronization.
So will it work fine or i should go another way?
Resuming main goals:
1) I need no locks on base table (or locks on VERY small time);
2) Always actual search results.

You can use sync(on commit) in your index parameters, which will make recent DML searchable immediately. You will still need to optimize and rebuild periodically to eliminate index fragmentation. The more frequently that you synchronize, the more fragmented your index will become. Index fragmentation slows down your queries that use the index. If you have some downtime or slow times such as weekends or nights, then that is a good time to do such things. If not, then you may wish to do so "online" to avoid interfering with searches or DML. Depending on the size of your table and the amount of DML, you may choose to optimize and/or rebuild hourly or daily or weekly or monthly or whatever.

Similar Messages

  • Spatial index creation for table with more than one geometry columns?

    I have table with more than one geometry columns.
    I'v added in user_sdo_geom_metadata table record for every column in the table.
    When I try to create spatial indexes over geometry columns in the table - i get error message:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 8
    ORA-06512: at line 1
    What is the the solution?

    I'v got errors in my user_sdo_geom_metadata.
    The problem does not exists!

  • Why Segment shrink is not supported for tables with function-based indexes

    As we all know , Segment shrink is not supported for tables with function-based indexes.
    But i'm very confused .
    Why Segment shrink is not supported for tables with function-based indexes ?? what's its essential?

    Creating a function based index creates a hidden virtual column (you'll see it if you query user_tab_cols) and once you index a virtual column you can no longer shrink the table:orcl> create table t1(c1 number,c2 as (c1 * 2)) segment creation immediate;
    Table created.
    orcl> alter table t1 enable row movement;
    Table altered.
    orcl>
    orcl> alter table t1 shrink space;
    Table altered.
    orcl> create index i2 on t1(c2);
    Index created.
    orcl> alter table t1 shrink space;
    alter table t1 shrink space
    ERROR at line 1:
    ORA-10631: SHRINK clause should not be specified for this object
    orcl>so the issue is not with function based indexes per se, it is a level beneath that. Perhaps because the virtual column has no physical existance, when the row is moved there is no reason for Oracle to realize that an index needs updating? I haven't attempted to reverse engineer this, I would be interested to know if anyone else has.

  • Always used 1 main account.  Started using individual user accounts. So how do I use software or applications with a lot of data like Quicken under my own user account?

    I recently upgraded our family's mac to OS X.  I thought this was the perfect time to create and use "user accounts".  We had always used 1 main account.  So how do I use software or applications with a lot of data like Quicken under my own user account?  I wanted to be able to manage my own itunes library, iphone apps, messages.  But I still really need to use the Stuff I have in Quicken essentials.  I don't want to have to restart all my work done in Quicken already.

    I haven't used Quicken in a while, but most applications store your files in your Documents folder. Is that where your Quicken data file is? What you do next depends on how many family members need to get at that data.
    If multiple family members need to use the Quicken data file, try moving it to the Documents folder in the Shared account. That is an account that all accounts can see. It's at the same level as the other accounts. In other words, Shared is one level up from your Home account, or Hard Drive/Users/Shared.
    If you're the only one allowed to see that Quicken data, move the Quicken data file from the old main account to your account, and don't leave a copy behind. You can use the Shared folder as a way station for the transfer since you won't be able to see both accounts' Documents folders at the same time (because you're not allowed to peek into other people's accounts). Or you can use another disk or server for the transfer, as long as you can get to it when logged into either account.

  • Best way to fill a datagird with A LOT of data?

    What's the best way to fill a datagrid with A LOT of data.
    I'm talking about something like 10,000 rows. Can the datagrid
    handle it? No screen is large enough to show 10,000 records..... is
    there a way to load 50, and then when a user scrolls down it loads
    the next 50 etc...?

    Right. It's not recommended that you load 10,000 rows into
    the datagrid at once. Using the data management service with paging
    enabled is a much better solution. See the Configuring the Data
    Management Service chapter in the Flex2 Developer's Guide for more
    info.

  • I recently got the iPhone 4s, but my iPod has a lot of apps with a lot of data on them and don't want to start over. I already synced my iPhone from the computer that had all my apps from my iPod, how do i transfer the data over, the other apps did.

    I recently got the iPhone 4s, but my iPod has a lot of apps with a lot of data on them and don't want to start over. I already synced my iPhone from the computer that had all my apps from my iPod, how do i transfer the data over, the other apps did. But some reason the app Clash Of Clans did not. Thank you.

    If I wiped my phone I wouldn't have the contacts on my phone to send to my self.    I would need to take just the contacts from my back up. I would have to do this through iTunes and I don't see how I can just extract the contacts only from my back up. From what I can figure out it is all or nothing

  • Support for triggers for tables with clustered column-store indexes

    Hello,
    We are very excited about the new clustered column-store indexes in SQL 2014 and our performance tests shows significant performance gains.  However, our existing functionality relies on triggers and they are not allowed on tables with column-store
    indexes.  Does anybody have information as to whether allowing triggers on tables with column-store indexes is anywhere on the radar?
    Thank you!
    P.S.  We spent a lot of time considering various work-around to avoid triggers, but the amount of work we would have to do is simply overwhelming, so we are considering delaying our upgrade until such functionality hopefully becomes available.

    My gut reaction is that this restriction is likely to remain for the forseeable future. Columnstore indexes are intended for data warehouses, and while I don't do data warehouses myself, I cannot say that a fact table is where I expect to find a trigger.
    But if you think that there is a good business case for permitting triggers on columnstore tables, submit a suggestion on
    https://connect.microsoft.com/sqlserver/feedback
    Note that if you give some business-oriented explantion why this is a great benefit, it is more likely that Microsoft is likely to listen.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Server 2014 Bug - with Clustered Index On Temp Table with Identity Column

    Hi,
    Here's a stored procedure.  (It could be shorter, but this will show the problem.)
              CREATE PROCEDURE dbo.SGTEST_TBD_20141030 AS
              IF OBJECT_ID('TempDB..#Temp') IS NOT NULL
                 DROP TABLE #Temp
              CREATE TABLE #Temp
               Col1        INT NULL
              ,Col2        INT IDENTITY NOT NULL
              ,Col3        INT NOT NULL
              CREATE CLUSTERED INDEX ix_cl ON #Temp(Col2)
              SET IDENTITY_INSERT #Temp ON;
              RAISERROR('Preparing to INSERT INTO #Temp...',0,1) WITH NOWAIT;
              INSERT INTO #Temp (Col1, Col2, Col3)
              SELECT 1,2,3
              RAISERROR('Insert Success!!!',0,1) WITH NOWAIT;
              SET IDENTITY_INSERT #Temp OFF;
    In SQL Server 2014, If I execute this (EXEC dbo.SGTEST_TBD_20141030)   It works.   If I execute it a second time - It fails hard with: 
            Msg 0, Level 11, State 0, Line 0
            A severe error occurred on the current command.  The results, if any, should be discarded.
            Msg 0, Level 20, State 0, Line 0
            A severe error occurred on the current command.  The results, if any, should be discarded.
    In SQL Server 2012, I can execute it over and over, with no problem.  I've discovered two work-a-rounds:   
    1) Add "WITH RECOMPILE" to the SP CREATE/ALTER statement, or 
    2) Declare the cluster index in the TABLE CREATE statement, e.g. ",UNIQUE CLUSTERED (COL2)" 
    This second option only works though, if the column is unique.    I've opted for the "WITH RECOMPILE" for now.  But, thought I should share.

    Hi,
    I did not get any error Message:
             CREATE TABLE #Temp
               Col1        INT NULL
              ,Col2        INT IDENTITY NOT NULL
              ,Col3        INT NOT NULL
              CREATE CLUSTERED INDEX ix_cl ON #Temp(Col2)
              SET IDENTITY_INSERT #Temp ON;
              RAISERROR('Preparing to INSERT INTO #Temp...',0,1) WITH NOWAIT;
              INSERT INTO #Temp (Col1, Col2, Col3)
              SELECT 1,2,3
              RAISERROR('Insert Success!!!',0,1) WITH NOWAIT;
              SET IDENTITY_INSERT #Temp OFF;
    SELECT * FROM #Temp
    OUTPUT:
    Col1 Col2
    Col3
    1 2 3
    1 2 3
    1 2 3
    Select @@version
    --Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) 
    Oct 19 2012 13:38:57 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • Ora 14098 Index mismatch for tables  in Alter Exchange Partition

    Hi All,
    I want to exchange data from retek schema to CONV schema. Both the table have same partition, but there is no data in CONV table.
    So I'm populating the data from retek of one particular partition into one staging table and then I'm doing exchanging partition with staging table to CONV table.
    I have created the same index and constraints for staging as there are in CONV table.
    But When I'm doing exchange partition I'm getting error Index mismatch.
    v_parition_name:='mar 2012'
    v_stmt := 'create table staging_tab_st_hist as ( select * from retek.abc_st_hist partition(' ||
    v_parition_name || ') )';
    execute immediate v_stmt;
    v_stmt := ' alter table conv.abc_st_hist exchange partition ' ||
    v_parition_name ||
    ' with table staging_tab_st_hist
    including indexes without validation';
    execute immediate v_stmt;

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    Hi All,
    I want to exchange data from retek schema to CONV schema. Both the table have same partition, but there is no data in CONV table.
    So I'm populating the data from retek of one particular partition into one staging table and then I'm doing exchanging partition with staging table to CONV table.
    I have created the same index and constraints for staging as there are in CONV table.
    But When I'm doing exchange partition I'm getting error Index mismatch.
    v_parition_name:='mar 2012'
    v_stmt := 'create table staging_tab_st_hist as ( select * from retek.abc_st_hist partition(' ||
    v_parition_name || ') )';
    execute immediate v_stmt;
    v_stmt := ' alter table conv.abc_st_hist exchange partition ' ||
    v_parition_name ||
    ' with table staging_tab_st_hist
    including indexes without validation';
    execute immediate v_stmt;
    >
    I don't see any index creation on the staging table. You said this
    >
    I have created the same index and constraints for staging as there are in CONV table.
    >
    But you didn't create the indexes. When you do the CTAS (create table as select) it only creates the table with the same structure; it doesn't create ANY indexes.
    Add the code to create the necessary indexes after you populate the staging table.

  • Error dialog when open index dialog on tables with spatial index

    Hi all,
    When I want to open in the preferences of a table with a spatial index the index dialog, then there appears the following message:
    "Index <myIndex> column GEOMETRY, datatype SDO_GEOMETRY is not a valid column type for use in a text index".
    I can only click the ok button, but I am not able to modify any of my set index.
    Does anyone else have the same problem?
    regards markus
    Version:
    Java: 1.6.0.16
    Oracle IDE: 2.1.1.64.39
    OS: Linux, Ubuntu 9.10
    Edited by: markusin on Mar 3, 2010 12:32 AM

    I have the same problem on SQLDev 2.1.1 for Windows. I hadn't this problem in 1.5.
    I must use a normal sql script to create spatial index.
    Vittorio

  • Multiple indexes on a table with various combinations

    Hi Experts,
    This post is similar to my previous one on indexing. am just trying to understand proper indexing strategy.
    Assuming that i have to use following queries frequently.
    select Col1, Col2, Col3 from tab where col4='some value'
    select Col1, Col2, Col3 from tab where col5='some value'
    select Col1, Col2, Col3 from tab where col6='some value'
    select Col1, Col2, Col3 from tab where col7='some value'
    select Col1, Col2, Col3 from tab where col8='some value'
    select Col1, Col2, Col3 from tab where col9='some value'
    select Col1, Col2, Col3 from tab where col10='some value'
    here, my doubt is, do we need to create "1 clustered + 6 NC covering" indexes (total 7) as we have 7 different columns in the where clause in 7 different select statements? Or, is there any better way of doing this?
    Thanks,
    Shiva

    >am just trying to understand proper indexing strategy.
    There is no such a thing. It is an art.
    Generally you can use covering index for a business critical query. But that may slow down other queries because the covering index usually wide! You need to
    check the execution plans for each query involved.
    It is better to apply narrow fast indexes that way other queries will not slow.
    Remember STATISTICS! It should be updated nightly:
    http://www.sqlusa.com/articles/query-optimization/
    The database engine uses the STATISTICS for the execution plan preparation not the index.
    For best performance the indexes should be narrow (fast) and STATISTICS up-to-date.
    Missing/fragmented/wide indexes & out-of-date STATISTICS are detrimental for performance.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • To search for tables with fields

    hey hi!!
    can anybody tell me the name of tables frm dose i can find fields for values of goods rteceived and issued in particular time period and also number of units of goods in that period.
    regards,

    vague...your requirement
    try to search for tables by fields with se16 and table DD03L
    A.

  • af:table with 2 sets of data

    Hi All,
    I have an af table below thats being populated via #{jpabean.myEntityList}. My requirement is to have a search function on this. I created an input text as below that takes the search value, and set the return data which will be #{jpabean.myEmplidList}, I just want to know how to populate my table with this second set of data
    <af:table value="#{jpabean.myEntityList}" var="row" rowBandingInterval="0" id="t1"
    rowSelection="single" columnSelection="multiple"
    columnStretching="column:c4" allDetailsEnabled="true"
    disableColumnReordering="true" fetchSize="100" styleClass="AFStretchWidth"
    partialTriggers="cb2">
    <af:inputText label="Emplid" id="it1" autoSubmit="true"
    valueChangeListener="#{jpabean.valueChanged}"/>

    Hi,
    i will suggest to create search form using ebj/jpa or pojo data control. pls refer the below links for guidence.
    http://www.oracle.com/technetwork/developer-tools/jdev/index-155270.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/73-handson-wsdc-321927.pdf
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/37-adf-pojo-pagination-169179.pdf
    ~Abhijit

  • How to make use of Index of a table in report to fetch data?

    Hi,
    I need a sample code for select statement which is making use of INDEX of a table
    to fetch data.
    Doubt:
    Can I fetch all the fields in the table by passing certain key fields of INDEX in where condition?

    Hi Raja,
    1) Mention the fields that you wish from database table (incase you don't need all the fields from the database table).
    2) Don't use the INTO CORRESPONDING FIELDS OF TABLE ztable clause.
    3)Instead use INTO TABLE ztable (But take care that during the declaration of the ztable, the fields declared are in order that in database table to fetch the Records in sequence).
    Please Find the Syntax and Code Below..
    SELECT *  FROM <TABLE>
      WHERE  <WHERE>
        %_HINTS ORACLE 'INDEX("<TABLE>~<INDEX ID")'.
    SELECT carrid
    INTO TABLE t_spfli
    FROM spfli
    WHERE carrud IN s_carrid AND
    connid IN s_connid
    %_HINTS ORACLE 'INDEX("&SPFLI&" "SPFLI~XXX")'.
    Hope this Is helpFul
    Thanks
    kalyan

  • How to get around a performance issue when dealing with a lot of data

    Hello All,
    This is an academic question really, I'm not sure what I'm going to do with my issue, but I have some options.  I was wondering if anyone would like to throw in their two cents on what they would do.
    I have a report, the users want to see all agreements and all conditions related to the updating of rebates and the affected invoices. From a technical perspective ENT6038-KONV-KONP-KONA-KNA1.  THese are the tables I have to hit.  The problem is that when they retroactively update rebate conditions they can hit thousands of invoices, which blossoms out to thousands of conditions...you see the problem. I simply have too much data to grab, it times out.
    I've tried everything around the code.  If you have a better way to get price conditions and agreement numbers off of thousands of invoices, please let me know what that is.
    I have a couple of options.
    1) Use shared memory to preload the data for the report.  This would work, but I'm not going to know what data is needed to be loaded until report run time. They put in a date. I simply can't preload everything. I don't like this option much. 
    2) Write a function module to do this work. When the user clicks on the button to get this particular data, it will launch the FM in background and e-mail them the results. As you know, the background job won't time out. So far this is my favored option.
    Any other ideas?
    Oh...nope, BI is not an option, we don't have it. I know, I'm not happy about it. We do have a data warehouse, but the prospect of working with that group makes me whince.

    My two cents - firstly totally agree with Derick that its probably a good idea to go back to the business and justify their requirement in regards to reporting and "whether any user can meaningfully process all those results in an aggregate". But having dealt with customers across industries over a long period of time, it would probably be bit fanciful to expect them to change their requirements too much as in my experience neither do they understand (too much) technology nor they want to hear about technical limitations for a system etc. They want what they want if possible yesterday!
    So, about dealing with performance issues within ABAP, I'm sure you must be already using efficient programming techniques like using Hash internal tables with Unique Keys, accessing rows of the table using Field-Symbols and all that but what I was going to suggest to you is probably look at using [Extracts|http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ed135c111d1829f0000e829fbfe/content.htm]. I've had to deal with this couple of times in the past when dealing with massive amount of data and I found it to be very efficient in regards to performance. A good point to remember when using Extracts that, I quote from SAP Help, "The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem."
    Hope this helps,
    Cheers,
    Sougata.

Maybe you are looking for

  • How to improve speed of data acquisition? Help needed urgently.

    I want to convert analog signals to digital signals and simultaneously perform some search on the data acquired and this whole process has to be done continuously for few hours. So I tried writing two programs in Matlab, one acquires the analog data

  • Emac 1.25ghz 1gb (i think 10.4.11) grey screen/no boot.

    Hi all, eMac wont boot, just sits on the grey screen (with no spinning loading thing, no folder with question mark or anything). I cant tell if it is chiming (the speakers have never worked on it). It doesn't sound like the HD is spinning up (If i re

  • Database will not update! grr

    I am using an excel database to store a string "Verb" and a number "Type". Heres the thing: The update works IF excel has the database open and is displaying it. Then when i click the save button, I can see in excel that my verb has popped up. Then,

  • HELP -ZipOutputStream performance is not consistent across servers

    Hi, I have a pretty standard code that zips one folder in a zip file using ZipOutputStream. The folders that are zipped are 2 GB in size and consists of TIFF images files. We are currentinly in the testing phase and notice very inconsistent performan

  • Iphone and camera

    Two or three times a week I receive a phone call on my iPhone with an unrecognizable number. When I answer it, my camera clicks. Can someone activate the camera in my phone from another location??????!!! Not good, if it's possible . . .