Is it not logical to have an index on a column of timestamp?

Hello

We have a table that contains virtually all the changes made by users on the application. As you can imagine, it's one of the greatest paintings in our system.

The table contains columns as create_date, start_date and end_date (when this change begins and when it ends) and so on.

I am responsible for the drafting of a report by cognos and the requirement is that, for a supplied start and date to end, to find all the records in the table where the create_date column is between the parameter start date and end date.

Problem is that the create_date table is not indexed, so literally kill my query and the report is always full time due to a table scan.

This create_date column is a timestamp, and according to my understanding, an index will perform better if the selected column is less distinct values. If I choose this column of an index, then I believe that the index will probably get the same size as the table itself.

Please correct me if I'm wrong.

The other option, that i've got is to force the user to use another parameter in our page of report parameter - addition - dates. These parameters are not required at the moment. Some of these parameters are indexed columns that will certainly make my faster query.

Thank you

Yes. If enough selective report criteria, an index on your date / timestamp fields can be very useful. If someone is trying to make every row in the table in a report, table scan will be the most effective way to achieve this, ignoring any index you happen to have.

One suggestion might be to put in place a mechanism limiting so that if a user inadvertently tries to run a query without setting that give them an immediate error rather than let issue them a query which will turns off into the weeds.

Justin

Tags: Database

Similar Questions

  • Spatial DB: ORA-13226: interface not supported without a spatial index (but is no index)

    Hello, I'm trying to find the solution to this problem for quite a long time, but still could not solve it. I have a table where a column has the value of SDO_GEOMETRY, I filled the table, index about it like:

    CREATE the INDEX Spatial_object_idx ON Spatial_object (geometry) INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    then when I run the query

    SELECT s1.id FROM Spatial_object s1

    WHERE s1.valid_to > =? AND s1.valid_to <? AND THERE ARE)

    SELECT s2.id FROM Spatial_object s2 WHERE

    S2.ID = S1.ID AND s2.valid_from = s1.valid_to + 1

    AND SDO_EQUAL (s1.geometry, s2.geometry) = 'TRUE');

    I got an error mentioned above, but when I put the SEPARATE statement after SELECT, it is without error.

    Could someone explain why this phenomenon occurs? Am I missing something here?

    I use jdbc7 on linux and the server is running under oracle 11g.

    Thanks a lot for any help

    Can you please try "SDO_EQUAL (s2.geometry, s1.geometry)"?

    SELECT s1.id FROM Spatial_object s1

    WHERE s1.valid_to > =? AND s1.valid_to

    SELECT s2.id FROM Spatial_object s2 WHERE

    S2.ID = S1.ID AND s2.valid_from = s1.valid_to + 1

    AND SDO_EQUAL (s2.geometry, s1.geometry) = 'TRUE');

  • Update for Sierra and now my Apple music does not appear I have a subscription and I am unable to get my music on the cloud?

    Update for Sierra and now my Apple music does not appear I have a subscription and I am unable to get my music on the cloud?

    Hey there Scotchman2926,

    I understand that you are experiencing some problems with Apple music on Sierra. I have a few suggestions to help you solve this problem. First of all, if you are unable to access the iTunes Store as well as music from Apple, use the information in this article to help resolve this problem:

    If you cannot connect to the iTunes Store - Apple Support

    If this does not resolve the problem, you might try signing out of your Apple ID in iTunes and then connect again.

    Thanks to be come to the communities of Apple Support and let us know how it goes.

    See you soon.

  • Will be Firefox for android get firefox Hello? Or will never happen because telefonica is not interested to have in firefox for android?

    Firefox for android will get firefox Hello and when? Or will never happen because telefonica is not interested to have in firefox for android?
    Hello, Firefox is the right thing and it would be much larger if it is available on android for direct use from phone to phone.

    I don't have an ETA for you, but it is spoken, here is a list of bugs to integrate the UX, etc.:

  • Copy and paste shortcuts do not work. Have to use the mouse or go to the menus. Any suggestions? Copy and paste work fine in Safari

    Copy and paste shortcuts do not work. Have to use the mouse or go to the menus. Any suggestions? Copy and paste work fine in Safari edition

    I tried on two different machines of 10.7 and it seems to work for me on most sites, but there are certainly a few where it is broken. What extensions do you use? (Check the tools > Add-ons)

  • My iPhone freeze with grey screen, then restart only. Subsequently, the Wifi is not available, I have to finish manually restart.

    My iPhone freeze with grey screen, then restart only. Subsequently the Wifi is not available, I have to finish manually restart to be able to use the Wifi. I have restart my internet and network settings, but the problem is still there.

    Hi there Turco911,

    Looks like your screen goes gray and then shuts down its own, and you must manually restart to get the wifi to work again. I save your device in iTunes, then restore it like new and verify that it works.

    How to clear your iOS device and then set up as a new device or restore from backups

    If this is the case, restore your backup either check it still works and just reinstalled software or circumvent the problem in the backup file itself.

    If when restored like new the problem persists, I would ask for your phone service:

    Repair - iPhone Apple Support

    Thank you for using communities of Apple Support, all the best!

  • Fix KB2518864 & KB2478658 updates will not install and have a problem. How to solve this action?

    Fix updates KB2518864 & KB2478658 will not install and have a problem. How to solve this action? This fix tries to install when arrested computer, but when the computer is turned back on, there is a box which reads:

    Patching HOTIRON Setup has encountered a problem and needs to close. We are sorry for the inconvenience.

    Hi MrGreener,

    1. did you of recent changes on the computer?

    2 are you able to install all other updates on the computer?

    3. do you have security software installed on the computer?

    4. you receive an error message while updates?

    Method 1

    I suggest that you manually download and install updates, check if it installed correctly on the computer.

    Security Update for Microsoft .NET Framework 3.5 Service Pack 1 and .NET Framework 2.0 Service Pack 2 on Windows Server 2003 and Windows XP

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=26323

    Security Update for Microsoft .NET Framework 3.5 Service Pack 1 and .NET Framework 2.0 Service Pack 2 on Windows Server 2003 and Windows XP

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=26427

    See also the articles below to learn more about known issues for both updates and check if it helps.

    MS11-044: Description of the update of security for the .NET Framework 3.5 Service Pack 1 and the .NET Framework 2.0 Service Pack 2 on Windows XP Service Pack 3 and Windows Server 2003 Service Pack 2: Jun

    http://support.Microsoft.com/kb/2518864

    MS11-039: Description of the update of security for the .NET Framework 3.5 Service Pack 1 and the .NET Framework 2.0 Service Pack 2 on Windows XP Service Pack 3 and Windows Server 2003 Service Pack 2: Jun

    http://support.Microsoft.com/kb/2478658

    Method 2

    If the previous step fails then I would suggest that reset you the default Windows Update components and later try to install updates.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Method 3

    If the previous step fails, then it is possible that some third-party programs installed on the computer is causing the problem.

    I suggest that you put the computer in a clean boot state and check if it helps.

    To help resolve the error and other messages, you can start Windows XP by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    See section to learn more about how to clean boot.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    (a) click Start, type msconfig in the search box and press ENTER.

    (b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.

    (c) under the general tab, click the Normal startup option, and then click OK.

    (d) when you are prompted to restart the computer, click on restart.

  • Re-installing Windows XP (OEM - purchased version of njewspaper ad without mentioning it was OEM only) after the installation of the pirate Win Xp (full version). Can I retrieve pirate settings to not reinstall aps (have about 100). __

    Hello
    I'm trying to reinstall Windows XP (OEM - purchased version advertises in newspapers not to mention it was OEM only) after the installation of the pirate Win Xp (full version). Can I retrieve pirate settings to not reinstall aps (have about 100).
    (I guess I have to change registry to eventually replace OEM version with pirate version - it still would make it impossible to activate the automatic updates). Or I can just reinstall registry then replace edition OEM version? (Would still allow the applications to be installed without the re - install?) (A major pain).

    Visit the Genuine Microsoft software and click on Validate Windows.  After that validation fails, look for the Get Genuine button and click on it to find out how to acquire a Kit of WGA. Carey Frisch

  • After repaired Windows XP Prof on my HP computer with OEM license while trying to connect to his request activate windows with option or NOT, although I have to say yes or no its loging off drving not me to the main Windows screen

    After repaired Windows XP Prof on my HP computer with OEM license while trying to connect to his request activate windows with option or NOT, although I have to say yes or no its loging off drving not me to the main Windows screen... How do I activate windows or how can I connect windows. Once I login I can activate as I have OEM license... Pls advice

    Activation of Microsoft Hotline - (888) 571-2048 MS - MVP - Elephant Boy computers - don't panic!

  • windows\system32\config\system\file is damaged or missing, system will not start, I have not connection wired, software was on the laptop at the time of purchase

    system will not start, I have not connection wired, software was on the laptop at the time of purchase.

    Hello

    There is no Windows Vista downloads available from Microsoft.

    You can contact your computer manufacturer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    And if you have never received a recovery disk when you bought your computer, there should be a recovery Partition on the hard drive to reinstall Vista on how you purchased your computer.

    The recovery process can be started by pressing a particular combination of the key or keys at startup. (Power on / start)

    Maybe it's F10, F11, Alt + F10, etc., depending on the manufacturer.

    Ask them to the proper key sequence.

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • I want to keep my cookies, they are something, I'll share with only the one who gave it to me, no one else could even not that I have.

    Well thank you for clicking on my question curiously titled! Now, I want to block access to cookies. I do not want to block cookies, they are useful. Example; ABC let me a cookie, I'm on Zxy which can then read cookie Abc. That's what I want to stop. I don't want a site that does not allow the cookie to be able to see the cookie. I want to keep my cookies, they are something, I'll share with only the one who gave it to me, no one else could even not that I have. I tell myself that there must be a way to do this with Windows, I mean after all it allows read/write access.

    P. S.

    I like the fact that I can write on a cookies this way.

    Hello

    Thank you for your response. I appreciate your time.

    I suggest you refer to the Chrome support the link mentioned below:

    Google Chrome help

    Sincerely,

    Ankit Rajput

  • An error has occurred. not all features have been changed successfully - installation of games

    When you try to install the package of games in the Turn Windows features On or Off, I get the error "an error has occurred. not all features have been changed successfully"and then asks me to restart. Restarting does not solve the problem, nothing is installed.

    I tried update readiness tool, but also running SFC (suggestions found elsewhere in this forum) does not.
    I am running Windows 7 Professional x 64

    Are you able to develop the games (sign + box) and see a complete list of the games?  If you can does differences if you play with the checking and unchecking some of the games listed?

    Have you tested with another user in which case your user name is having problems?

    Will be installing SP1 if you try to install in a clean boot environment?

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/default.aspx/KB/929135

    http://www.Google.com.au/search?q=error%3A+ERROR_SXS_ASSEMBLY_MISSING (0 x 80073701) & sourceid = ie7 & rls = com.microsoft:-to the: IE-address & ie = & oe = & redir_esc = & ei = _GNuTqOdINGQiAe-572wBA

    If you cannot install the SP1, and features Windows is causing problems too, so maybe it's time to think about saving your valuable data and then reinstalling Windows?  What options of recovery supplied with your machine?

  • Installation of IIS on Windows 7 Professional: an error has occurred. Not all features have been installed correctly.

    I try to install IIS on my Windows 7 Professional machine and I get the error message "an error has occurred. Not all features have been installed correctly. »

    I went to a pole, but have found no answer that applies to my laptop.

    I tried this link, but no ISAPI filters are listed:
    http://support.Microsoft.com/kb/929772

    A is not installed as has been suggested by several sites.

    I tried to run the control panel as administrator quick control using control - appwiz.cpl

    nothing seems to work.

    I solved this by
    1 uninstall .net 3.5 in "characteristics on and out of the tower"
    2 reset
    3. install .net 3.5 in 'features turn on and outside'
    4. install the IIS services

  • My ORB start does not, he will have all the features and the icon disappear, just to the left of the word it

    My ORB start does not, he will have all the features and the icon disappear, just to the left of the word it

    even using restore window can not solve the problem, I use windows 7 pro, this happen after the update I have install on September 24, 2012

    Hello

    1. What is the KB (Knowledge Base) number associated with the update?

    2. the problem persists only with ORB start?

    Method 1: Make the SFC (System File Checker) scan and see if the problem occurs.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    Method 2: Use the Microsoft Safety Scanner in full scan mode and remove all threats that is not detected by it and see if the problem persists.

    Microsoft safety scanner

    Note: the Microsoft Safety Scanner expires 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    The Microsoft Safety Scanner is not a replacement for the use of antivirus software that offers continuous protection.

    Hope this information helps.

  • How to find the library files that are not due to problems of indexing

    I need help to know how to find the library files that are not as a result of indexing problems?

    I use Windows 7

    Thank you

    Charlene

    Try to open the folder that the library uses directly.  For example, if it is your Documents folder, open C:\Users\Charlene\Documents

Maybe you are looking for