Get Last Sync and Last Full/Fast Optimization time of a Text Index

Hi,
How to get when a text index was last Sync and Last Full/Fast Optimization in oracle 10g and 11g
- Nimish Garg

Hi,
to my knowledge Oracle will not keep this kind of data (I can not find any view in CTXSYS schema which gives this information. Depending on the method of synching there are some options:
- If you used 'SYNC (ON COMMIT"), then the index is always synched and there is no date to be found
- If you used 'Every "interval"', there is a job created (select idx_sync_jobname from ctx_user_indexes). You can find the last runtime of this job to get the last sync date
- If you used 'MANUAL', then the Sync is up to you. You can query CTX_USER_PENDING for the index. In this table the records are recorded which need to be synced. So the lowest PND_TIMESTAMP will give you an idea, of the possible last sync date, it is before this timestamp.
If you do it manual, you can of course keep your own table which records the date.
Herald ten Dam
http://htendam.wordpress.com

Similar Messages

  • How to get current month and last month dynamically??

    how to get current month and last month dynamically
    like
    month = getCurrentMonth();
    lastmonth = getcurrentMonth() -1;
    please help
    thanks

    hi :-)
    /* depracated but can be still useful */
    java.util.Date dtCurrent = new java.util.Date();
    int month = dtCurrent.getMonth();
    int lastmonth = dtCurrent.getMonth() - 1;
    System.out.println("* " + month);
    System.out.println("* " + lastmonth);
    /* better to use this one */
    Calendar cal = new GregorianCalendar();     
    int imonth = cal.get(Calendar.MONTH);
    int ilastmonth = cal.get(Calendar.MONTH) - 1;
    System.out.println("*** " + imonth);
    System.out.println("*** " + ilastmonth);
    regards,

  • Averaging over the last hour and last eight hours.

    This is fairly simple but I'm not sure what a "good" approach is. Basically I need to track how many times a user has performed an action over the last hour and last eight hours. I'll receive a notification of some sort when they perform this action and could get the current time, but I'm not sure what a fast way of determining how many times this has occurred in a given time period is.
    I was thinking perhaps an array with the time of each in milliseconds and just find the first index that was < 8 hours or < 1 hour ago and then subtract the index from the current size. I think that would be problematic though. To keep the array from continuously growing I'd have to shift everything over to the left which means an expensive arraycopy. Perhaps if I only did the resizing when there were > 20 or elements I no longer care about or something would help, but then I'd have to iterate over 20 elements I don't care about everytime it's calculated, which is once a second.
    Any algorithms that will solve this?

    Here is a method with a granularity of a minute (i.e.
    it only updates the average value every minute - you
    can change it to give whatever granularity you want)
    Keep an array with 60 elements in it. The array
    counts the number of times that the user performed
    the action each minute.
    The array in indexed modulo real time, and you make
    entries based on actual time of day. So when a user
    performs an action at 8:38:45 you increment slot 38.
    Each slot counts the number of actions that took
    place in that particular minute. When the next minute
    rolls around, you move to the next slot, set the
    value to zero (thus throwing out the events that
    happened over an hour ago, and prepare to count the
    new events)
    The sum of the entire array is of course the total
    number of events that have taken place in the last
    hour.
    You do not need to actually run through the array and
    total the events every time you want to calculate the
    average. You can use the fact that you increase the
    total by one every time you get a new event and you
    decrease the total by X everytime you zero out a slot
    that had X for its event count.
    So you can just keep a single value, Total, along
    with your array that goes up by one on every event
    and then drops back a little every minute, when you
    throw out the hour old events.That is probably a good solution to the question I posed, but I realize now I was not thorough or accurate enough in describing the context and requirements. I don't think that will work without a lot of unnecessary memory, but maybe I'm wrong.
    The user action is actually the successful completion of entering a form, a bill to be more precise. I expect this to happen 100-300 times an hour to give an idea of the frequency. Given a period of time, if they've been at it for that period of time or longer I need to find the number of bills completed in that most recent period of time. Otherwise, I need to use what is available to predict what they will reach in that period of time. In other words, if the time period is an hour I need to figure out how many bills were completed in the last hour, but if they've been going for only five minutes I need to predict what they will have completed in an hour including those last five minutes. Then I need to do the same thing for seven hours, using the last seven hours or less of data.
    I guess I'd just have to use a granularity of a minute or less and calculate how many bills over how many minutes and make a prediction on that? I suppose I was hoping for something more precise, but now that I think about it that will probably suffice.
    How would you implement it though? Create a "minute" array of size 60 initially, then when reaching the end of that array adding the total for that array to an "hourly" array (keeps track of bills in that hour) and then start over? I guess then you'd just have to add each from the hourly array to the current total and calculate based upon that. At any given time I'd have the number of bills processed in the last x hours and y minutes, which is enough to calculate how much can be completed at that rate in a given hour or seven hour day.
    I'll try this tomorrow when I get to work, thank you very much I was needlessly complicating it with timestamps. In fact, this inadvertently (or perhaps purposefully?) solves an issue with not calculating time when a user is at lunch or on break. At least I think it does.

  • Finding Last friday and Last monday of current date

    Hi
    Please help me to get the Last friday and Last monday of current date using an sql query.
    If I am running query on 7th July 2008 ,it should give me Last friday as 07/04/2008 and Last monday as 07/07/2008
    I need to compare it with another date filed
    eg: Select * from employee where ReportedDate between [Last Friday] and [Last Monday]

    It works many times but fails for this scenario- If today is Friday and I run following query today, it throws today's date, which is incorrect. I need previous Friday's date to be returned everytime.
    select next_day (sysdate-7,'FRIDAY') Last_Friday from dual
    Edited by: user6402026 on May 22, 2013 1:43 PM
    Edited by: user6402026 on May 22, 2013 1:43 PM

  • How can we see Last Date and last quantities in Bex Analyzer ?

    H&#305; BW Gurus,
    I have a query that shows consumption quantities for a material regarding to a date interval. On initial screen i specify a material and a date interval ( 01.04.2007 - 15.04.2007 for example). Then query brings total consumptions(261 and 601 movement types) for materials. I set up the query according to stock cube.
    But my client wants the last consumptions (last 601 and last 261) quantities and dates in a different columns. When we include calendar day it can be seen easily all the lines day by day. But we dont want to include calendar day. Thus for one material only one row will be exist. Report template will be like that:
    On initial screen we defined april 2007 , Output:
    Material         Total consump. quantity     Last Consump. Quant.   Last.Cons.Date
    XYZ                         457                                 76                        18.04.2007  
    PS: 76 is included in 457.
    How can we achieve this result?
    Thank you all indeed
    Evren Temiz
    Message was edited by:
            Evren Temiz

    Hi Evren,
    What do you mean?
    Regards.

  • Firefox auto-updated to 3.6.9 last night and now it crashes every time I open the browser, even in safe mode.

    Firefox auto-updated to 3.6.9 last night and now it crashes every time I open the browser, even in safe mode.

    Hi there,
    You could try performing a clean installation: [[Knowledge Base Article]] :
    Some Firefox issues can be resolved by downloading a new Firefox installer from Mozilla.com, then closing Firefox, deleting the Firefox application folder (program files) and reinstalling Firefox. If this does not help, or if you would rather completely remove Firefox and start over instead of completing all the troubleshooting steps, follow these steps:
    1. Download the latest official version of Firefox from Mozilla.com.
    * You should avoid unofficial download sites that bundle Firefox with other software such as the Google Toolbar.
    2. If you wish to retain your current profile, you should make a backup copy of it. See Backing up your information for instructions.
    3. Uninstall Firefox and make sure you remove the Firefox application (program) folder and your Firefox personal data (user data and settings) - see Uninstalling Firefox for instructions.
    4. Reinstall Firefox - see Installing Firefox for instructions.
    5. When Firefox is started for the first time, the Import Wizard will appear and a new profile will be created.
    6. Verify that the issue no longer appears.
    7. If you made a backup of your old profile and wish to restore your old information, see Recovering important data from an old profile. For troubleshooting purposes, only copy the files corresponding to your bookmarks and saved passwords.
    8. Reinstall your extensions and themes one by one to determine if any specific one is causing the issue.
    source: https://support.mozilla.com/en-US/kb/Basic+Troubleshooting?s=clean+installation&as=s#Clean_reinstall

  • What's the difference between last seen and last a...

    What's the difference between  last seen and last activity by a contact's name?  Please be very specific  Many thanks.

    BUMP -> I'd also like to know the answer to this question.  Thanks, Lance

  • Last SCN and last squence

    hi,
    on 10g R2 is there any query to see last SCN and last squence number ?
    thank you.

    You can find many interesting things in v$database. Just check...
    SQL> desc v$database
    Nazwa                                     WartoťŠ NULL? Typ
    DBID                                               NUMBER
    NAME                                               VARCHAR2(9)
    CREATED                                            DATE
    RESETLOGS_CHANGE#                                  NUMBER
    RESETLOGS_TIME                                     DATE
    PRIOR_RESETLOGS_CHANGE#                            NUMBER
    PRIOR_RESETLOGS_TIME                               DATE
    LOG_MODE                                           VARCHAR2(12)
    CHECKPOINT_CHANGE#                                 NUMBER
    ARCHIVE_CHANGE#                                    NUMBER
    CONTROLFILE_TYPE                                   VARCHAR2(7)
    CONTROLFILE_CREATED                                DATE
    CONTROLFILE_SEQUENCE#                              NUMBER
    CONTROLFILE_CHANGE#                                NUMBER
    CONTROLFILE_TIME                                   DATE
    OPEN_RESETLOGS                                     VARCHAR2(11)
    VERSION_TIME                                       DATE
    OPEN_MODE                                          VARCHAR2(10)
    PROTECTION_MODE                                    VARCHAR2(20)
    PROTECTION_LEVEL                                   VARCHAR2(20)
    REMOTE_ARCHIVE                                     VARCHAR2(8)
    ACTIVATION#                                        NUMBER
    SWITCHOVER#                                        NUMBER
    DATABASE_ROLE                                      VARCHAR2(16)
    ARCHIVELOG_CHANGE#                                 NUMBER
    ARCHIVELOG_COMPRESSION                             VARCHAR2(8)
    SWITCHOVER_STATUS                                  VARCHAR2(20)
    DATAGUARD_BROKER                                   VARCHAR2(8)
    GUARD_STATUS                                       VARCHAR2(7)
    SUPPLEMENTAL_LOG_DATA_MIN                          VARCHAR2(8)
    SUPPLEMENTAL_LOG_DATA_PK                           VARCHAR2(3)
    SUPPLEMENTAL_LOG_DATA_UI                           VARCHAR2(3)
    FORCE_LOGGING                                      VARCHAR2(3)
    PLATFORM_ID                                        NUMBER
    PLATFORM_NAME                                      VARCHAR2(101)
    RECOVERY_TARGET_INCARNATION#                       NUMBER
    LAST_OPEN_INCARNATION#                             NUMBER
    CURRENT_SCN                                        NUMBER
    FLASHBACK_ON                                       VARCHAR2(18)
    SUPPLEMENTAL_LOG_DATA_FK                           VARCHAR2(3)
    SUPPLEMENTAL_LOG_DATA_ALL                          VARCHAR2(3)
    DB_UNIQUE_NAME                                     VARCHAR2(30)
    STANDBY_BECAME_PRIMARY_SCN                         NUMBER
    FS_FAILOVER_STATUS                                 VARCHAR2(21)
    FS_FAILOVER_CURRENT_TARGET                         VARCHAR2(30)
    FS_FAILOVER_THRESHOLD                              NUMBER
    FS_FAILOVER_OBSERVER_PRESENT                       VARCHAR2(7)
    FS_FAILOVER_OBSERVER_HOST                          VARCHAR2(512)
    SQL>

  • How to get the first and last record

    Hai All
    I have table called T1 and there are more than 8 lakhs records and i have a column called Timestamp so i need to get the first record value and time stampvalue and last record and time stamp value so that i can conclude that For Example
    form 13 june to 15 june data are here
    Kind Regards
    SrikkanthM

    Something like this can also indicate the first and last rows as you query...
    SQL> select empno, ename, hiredate
      2        ,case row_number() over (order by hiredate)
      3           when 1 then 'First Row'
      4           when count(*) over () then 'Last Row'
      5         end as flag
      6  from emp;
         EMPNO ENAME      HIREDATE            FLAG
          7369 SMITH      17/12/1980 00:00:00 First Row
          7499 ALLEN      20/02/1981 00:00:00
          7521 WARD       22/02/1981 00:00:00
          7566 JONES      02/04/1981 00:00:00
          7698 BLAKE      01/05/1981 00:00:00
          7782 CLARK      09/06/1981 00:00:00
          7844 TURNER     08/09/1981 00:00:00
          7654 MARTIN     28/09/1981 00:00:00
          7839 KING       17/11/1981 00:00:00
          7900 JAMES      03/12/1981 00:00:00
          7902 FORD       03/12/1981 00:00:00
          7934 MILLER     23/01/1982 00:00:00
          7788 SCOTT      19/04/1987 00:00:00
          7876 ADAMS      23/05/1987 00:00:00 Last Row
    14 rows selected.
    SQL>

  • JDE Date Last Paid and Last Paid Amount

    When these two fields, Date Last Paid (A5DLP) and Last Paid Amount (A5ALP) in the Customer File F0301 will be cleared? Which programs that clearing these?

    Can you not use last_standard_process_date and final_process_date from per_periods_of_service table? That table has person_id and instead of using pay_all_payrolls_f, it is easy to get the information from these tables as long as you know what elements in your system have last standard process and final process date set up.
    Please let me know if this helps
    -Jay

  • How to display Last modifed and Last modifed user in Apex?

    Hi All,
    Every time i need to display the "Latest Modifed" and "Last Modifed" data fetching from database and display the resultant in the right corner, similarly how we will display user name when we log into Apex application.
    Hints:
    1. I have created a two level tab and under Body i have am using like this
    <td valign="top">{div id="userId" class="t16NavigationBar"><span id="spanUserId" class="t16NavigationBar"> (&APP_USER.)</span>|{a href="&LINK." class="t16NavigationBar">&TEXT.</a>|&F105_ENV_NAME. #REGION_POSITION_08#</td>
    2. From the above syntax we are using the three attributes to display the data.
         &APP_USER.
         &TEXT.
         &F105_EVN_NAME.
    3. The Query which i am using to display the &F105_ENV_NAME. is
        SELECT DECODE(INSTR(global_name,'.'),0,
    global_name,
    SUBSTR(global_name,1,INSTR(global_name,'.')-1)) into :F105_ENV_NAME
    FROM global_name
    4. Similar instead of displaying the Enviornmen name i have to dsiplay these coulums from X table.
        Latest Modifed By
        Last Updated By
    How i can display such kind of these data, since every time it will differ. Can any one hep me on this.
    Thanks,
    Anoo..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    e
    This is some what equal instaed of displaying separted, in your screen you have three tabs, for a example you have ar showing for tabs rite..They only i want to dsiplay the person name.
    For example if you consider your screen you have shown "update anony policy"
    Now i want to display the name directly like this "update anony policy:Anoo" insated of dsiplaying in a separte screen.
    Hope you have got my point.
    Thanks,
    Anoo..

  • How can I retrieve last month and last mont -1?

    Hi guys, I am finishing to build a complex SSIS package, the last task is pretty simple but I'd like you to suggest the better solution in terms of performance (table with millions rows). The task is to create two table, one with the last update (archived)
    and one with the last update -1 (the update is done monthly) taking the data from an huge table (create by the package).
    The DDL (sample):
    create table forum (runner varchar(20), race varchar(20), nmonth varchar (6), archived datetime2)
    insert into forum values ('Zabres','Poland Red Bull','201411','2015-01-26 11:37:02.6870000'),
    ('Reynolds','Poland Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Greefer','Poland Red Bull','201411','2015-01-26 11:38:04.6870000'),
    ('Zabres','France Red Bull','201411','2015-01-26 11:38:10.6870000'),
    ('Reynolds','France Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Greefer','France Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Zabres','Poland Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-31 16:26:02.6870000'),
    ('Greefer','Poland Red Bull','201411','2014-12-31 16:26:14.6870000'),
    ('Zabres','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Reynolds','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Greefer','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Zabres','Poland Red Bull','201411','2014-12-11 10:30:14.5870000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-11 10:31:10.5550000'),
    ('Greefer','Poland Red Bull','201411','2014-12-11 10:31:14.3560000'),
    ('Zabres','Poland Red Bull','201411','2014-12-11 9:11:14.4420000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-11 9:11:54.7760000'),
    ('Greefer','Poland Red Bull','201411','2014-12-11 9:11:55.7860000')
    The tough thing is the format of archived. How can I take the last month and, especially, the last month -1 without caring about the seconds and milliseconds ?
    The expected is LAST MONTH
    LAST MONTH -1
    Many thanks in advance

    Yes! Your solution looks better, even in terms of performance (242 sec mine, 202 sec yours). Now I'm wondering the same, shall I upload the elements only once per month? What if I got more upload in one month?
    You can also upload it once per week
    In which case query would be like
    SELECT *
    FROM forum
    WHERE archived >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND archived < DATEADD(wk,DATEDIFF(wk,0,GETDATE())+1,0)
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Installed Office update last week and now Word crashes every time I use it

    Installed Office update last week and now Word quits unexpectedly every time

    Have you checked Microsoft office for mac support? http://www.microsoft.com/mac/support

  • Satellite Pro A300D gets to warm and shuts down after short time. HELP!!!

    Hallo together,
    i bought the Satellite Pro A300D notebook 3 weeks ago. Since the beginning I have the problem that the notebook gets to warm and shuts down within an hour!
    I dont run any high performance application and I keep the left side of the notebook free so that the warm air can get away! I already cleaned the heatpipe by using a hoover.
    That couldnt be! I need the notebook for work and thats impossible...
    What can I do? Do I have it to send in?
    For help I am thankfull
    Frank
    Message was edited by: DerVogel

    Hi there DerVogel ,
    Sounds like a Heat related issue ????????
    Whenever it shutdown automatically does it turn on right away ? One symptom of a heat related issue is, it takes about several minutes before you can turn it back on again.
    Here is how you can isolate the issue since it could also be a software related problem.
    1) Turn on the system Tap F2 and boot on the system setup screen ( BIOS )
    2) Just stay on the Bios , If it doest shutdown on the bios then you might need to reinstall windows. or check if system is infected with spyware or a virus.
    But if it does the same thing then the best thing to so is to bring it to a Repair Center or Call Tech support for a depot service repair.
    Cheers ! hope this will help.
    Message was edited by: iSkO

  • I just got my Macbook air last week and it was fast, but it started to get slower yesterday. Why? And how can I fix it?

    The only reason I bought the Macbook air was for speed. Will the laptop speed up again. Should I keep it or return it?

    You can return a new Mac within 14 days of purchase.
    Return it and get another one
    A new Mac is in warranty for 1 year from the date of purchase.
    A new Mac comes with 90 days of free tech support from AppleCare.
    AppleCare: 1-800-275-2273
    Call AppleCare.
    Best.

Maybe you are looking for