Which type of index is useful for date columns with time stamp

Hi all,
I am using date column in the where clause of an SQL Query. The values stored in the date column are includes timestamp. The query is very slow and there is no index on the date column.
Can any body suggest which index is better on date columns
Thanks

I am using date column in the where clause of an SQL Query.Dates a re hard queries to tune. This ...
WHERE start_date BETWEEN to_date('01-SEP-05') AND to_date('02-SEP-05')...probably requires a very different execution plan to this...
WHERE start_date BETWEEN to_date('01-JAN-01') AND to_date('02-SEP-05')Just bunging an index on the date column may speed up your specific query but break something else. So be careful.
Cheers, APC

Similar Messages

  • Can someone help with a previous post labeled "Writing to a data file with time stamp - Help! "

    Can someone possibly help with a previous post labeled "Writing to a data file with time stamp - Help! "
    Thanks

    whats the problem?
    Aquaphire
    ---USING LABVIEW 6.1---

  • Which LKM is to be used for data from oracle to file

    Hi All
    I am new to ODI. Please help me in understanding this tool.
    I want to know Which LKM is to be used for moving data from oracle to a comma seperated file etc.

    Hi John
    Thanks a ton... I was able to move ahead. I executed thinking all params are correct.
    But it did not go thru and gave me this error:-
    936 : 42000 : java.sql.SQLException: ORA-00936: missing expression
    java.sql.SQLException: ORA-00936: missing expression
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

  • Which BW Variable to be used for date when creating service in portal

    Hi,
    Can any one please let me know which BW variable is to be used for date(range) when creating a portal service for searching  based on dates.
    Thanks
    Abhai
    Message was edited by:
            Abhai

    Hi Arun,
    its just a portal service which would be called when  searching a document created on a particular date or betwwen a range of date.so what i require is which BW variable to be used when handling range.As for variable technical name we use VAR_NAME_I  and for single value variable we VAR_VALUE_EXT_I
    in the similar manner i want BW variable to be used for range of values.
    Thanks
    Abhai

  • Data acquisition with time stamp

    Hi I'm using NI DAQ 6211 to acquire acceration, strain and temperature from a VI. I have made several modifications and my last two vis are attached. I need to get 1000 data points from a encoder and sampling the period is by far the best way to get acceleration considering my hardware. 
    Is there a way to ensure that all three variables are synchronised within a timestamp without the vi slowing down?
    Sincerely
    Ahmad
    Attachments:
    test_6.vi ‏57 KB
    test_5.vi ‏50 KB

    The problem lies in synchronising the acceleration with the load and temperature. For acceleration I'm getting a period from a counter with Implicit values (i.e. without specifying timing). I have set the number of samples to acquire to 1000 points and this task does not require sample timing. Post processing the period data in matlab gives me the acceleration.
    Now my vi uses a Sample Clock with set number of samples being acquired for the load and temperature. This means that a set number of samples for load and temperature can be acquired and this time may not be enough to acquire the acceleration points; hence they cannot be mapped in time.
    The period is implicit and I can't find a way to synchronise with the load and temperature that are acquired at a fixed sample rate. The bottle neck in this problem is to get the acceleration (period recorded) in sync with the load and temperature. If this can be done without any compromise to the speed of the vi then this problem is resolved.
    I have attached the vis which will show the development to overcome this problem.
    Sincerely
    Ahmad
    Attachments:
    test_1.vi ‏50 KB
    test_2.vi ‏49 KB
    test_7.vi ‏49 KB

  • Writing to a data file with time stamp - Help!

    My program currently asks the user to enter a path to save the data from my virtual channels. What I want is to have a default directory to store my data in and also have the file name that is created to be the date. I tried to use create open or replace but I cant get it to work. Any suggestions would be great. Also and comments to the code would help out a lot.
    Thanks
    Attachments:
    Test.vi ‏141 KB

    Look at the attachment. It uses a front panel path control set to only select a new or existing folder (right click and Browse Options). Then, using a Build Path and a Format Date/Time String, a full path to a file is created. Pass this to your Open/Create/Replace File.
    Attachments:
    Date to File Name.vi ‏13 KB

  • Which Event Classes i should use for finding good indexs and statistics for queries in SP.

    Dear all,
    I am trying to use pro filer to create a trace,so that it can be used as workload in
    "Database Engine Tuning Advisor" for optimization of one stored procedure.
    Please tel me about the Event classes which i  should use in trace.
    The stored proc contains three insert queries which insert data into a table variable,
    Finally a select query is used on same table variable with one union of the same table variable, to generate a sequence for records based on certain condition of few columns.
    There are three cases where i am using the above structure of the SP, so there are three SPS out of three , i will chose one based on their performance.
    1) There is only one table with three inserts which gets  into a table variable with a final sequence creation block.
    2) There are 15 tables with 45 inserts , which gets into a tabel variable with a final
    sequence creation block.
    3)
    There are 3 tables with 9 inserts , which gets into a table variable with a final
    sequence creation block.
    In all the above case number of record will be around 5 lacks.
    Purpose is optimization of queries in SP
    like which Event Classes i should use for finding good indexs and statistics for queries in SP.
    yours sincerely

    "Database Engine Tuning Advisor" for optimization of one stored procedure.
    Please tel me about the Event classes which i  should use in trace.
    You can use the "Tuning" template to capture the workload to a trace file that can be used by the DETA.  See
    http://technet.microsoft.com/en-us/library/ms190957(v=sql.105).aspx
    If you are capturing the workload of a production server, I suggest you not do that directly from Profiler as that can impact server performance.  Instead, start/stop the Profiler Tuning template against a test server and then script the trace
    definition (File-->Export-->Script Trace Definition).  You can then customize the script (e.g. file name) and run the script against the prod server to capture the workload to the specified file.  Stop and remove the trace after the workload
    is captured with sp_trace_setstatus:
    DECLARE @TraceID int = <trace id returned by the trace create script>
    EXEC sp_trace_setstatus @TraceID, 0; --stop trace
    EXEC sp_trace_setstatus @TraceID, 2; --remove trace definition
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Which BW variable is used for date(range) when creating a portal service

    Hi,
    Can any one please let me know which BW variable is to be used for date(range) when creating a portal service for searching based on dates.
    Thanks
    Abhai

    Hi Arun,
    its just a portal service which would be called when  searching a document created on a particular date or betwwen a range of date.so what i require is which BW variable to be used when handling range.As for variable technical name we use VAR_NAME_I  and for single value variable we VAR_VALUE_EXT_I
    in the similar manner i want BW variable to be used for range of values.
    Thanks
    Abhai

  • Which LKM and IKM to use for Fast data loading b/w MSSQL 2005 and Oracle 11

    Hi,
    Can anybody help us to decide which LKMs and IKMs are best for data loading between MSSQL and Oracle.
    Staging Area is Oracle. We have to load around 400Million rows from MSSQL to Oracle 11g.
    Best regards,
    Muhammad

    Thanks Ayush,
    You are right and it has dumped the file very quickly; but it is giving error on sqlldr call thorugh jython. I have reaised SR with oracle to look into it further.
    thanks again and have a very nice time.
    Regards,
    Muhammad

  • HT4839 Which apn setting should I use for my iphone 4 on net10

    Which apn setting should I use for iphone 4 on net10

    APN Settings for Net 10
    Cellular Data
    APN: att.mvno
    Username: (Blank)
    Password:(Blank)
    MMS (Blank)
    APN: att.mvno
    Username: (Blank)
    Password: (Blank)
    MMSC: http://mmsc.cingular.com
    MMS Proxy: 66.209.11.33
    MMS Max Size: 1048576
    MMS UA Prof URL: www.apple.com/mms/uaprof.rdf
    Type exactly whats on here on your settings.
    Procedure:
    1- Turn on your phone
    2- Get paperclip take out tray and put your non working sim card in- T-moble and simple mobile sim cards work great for me on this venture.
    3. Goto Settings>General>Cellular>Cellular Network
    At this point its very critical that you do this fast, Once you change the sim card to your net 10 the option Cellular Network will only stay on for a few seconds while it's searching for service. You will need to click on cellular once the Net10 sim card is in and click on Cellular network again.
    4. Get your paperclip take out the tray put in the Net 10 sim card
    5. Goto Cellular>Cellular Network while it's searching for service
    6. Type in your settings that I list above
    7. Scroll back to your main setting (Do not press your Home Button)
    8. Once you see your service up and running try out your web and send a picture message it should work.
    9. If it does'nt work you mistype one of the settings, it has to be exact or it wont work.
    10. Do the process all over again
    Keep this information and the sim card away for a later date in case you lose your setting I have'nt turned off my phone or let my battery die to find out if I lose my settings. One thing for sure I lost it when I update to the IOS 6.0.1.

  • Which Datatype I have to use for Images in MS-Access Database.

    Hi Friends...
    I am Atif. I have stucked in a query. Please suggest me. 
    Which Datatype I have to use for Images in MS-Access Database ?
    Thanks in advance..
    Regards
    Atif

    Depends upon whether you are referring to a variable or the data type of the column in which to store the data. For a table you should use an OLE Object. For example, you could use something like the following to store an image into a Access table from a
    PictureBox (sans OLE header):
    Dim AccessConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=C:\Test Files\db1 XP.mdb")
    Dim AccessCommand As New OleDbCommand("INSERT INTO BlobTable (ID, BLOB) " & _
    "VALUES (@ID, @BLOBData)", AccessConnection)
    Dim PictureMemoryStream As MemoryStream = New MemoryStream()
    Form3.PictureBox1.Image.Save(PictureMemoryStream, System.Drawing.Imaging.ImageFormat.Jpeg)
    Dim BLOBData(PictureMemoryStream.Length - 1) As Byte
    PictureMemoryStream.Position = 0
    PictureMemoryStream.Read(BLOBData, 0, PictureMemoryStream.Length)
    AccessCommand.Parameters.AddWithValue("ID", 7)
    AccessCommand.Parameters.Add("BLOBData", OleDbType.LongVarBinary, BLOBData.Length, DataRowVersion.Current).Value = BLOBData
    AccessConnection.Open()
    AccessCommand.ExecuteNonQuery()
    AccessConnection.Close()
    Paul ~~~~ Microsoft MVP (Visual Basic)

  • Can a IDOC be used for data exchange from R/3 to CRM

    Hi All,
    First, can a IDOC be used for data exchange from R/3 to CRM
    I need to update few fields of SAP CRM Sales order with fields from SAP R/3 Work Order.
    To achive this can I use IDOC?
    Or do I update the R/3 sales order from R/3 Work order(using some interface or workflow), so that the sales order data flows from R/3 SO to CRM SO.
    Please respond immediately.
    Regards,
    Gopinath

    IDocs can be processed by the CRM system via XML/XIF adaptor. As this will be most probably a new interface that is not yet set up, it would be easier to change the orders in R/3 via an appropiate FM which should automatically generate a delta download BDoc.
    Even if they are not downloaded automatically a request download (defined via R3AR2 / 3 / 4) should take care of this.
    Hope this helps,
    Kai

  • Which type of documents are used in a project

    which type of documents are used in a project whether it may be implementation or development or upgradation or supporting
    and pls send the procedure how we can proceed in these cases as abaper
    thanks in advance

    Hi Praveen,
    Generally we have FS(Functional Specification) is created by Functional people.
    And technical designer develop the TS(Technical Specification).
    Developer gets the TS and write ABAP code for development.
    There are other documents like:
    1. TR file for tracking all transports
    2. TCR(technical change request) for change later if FS change.
    Hope it will clear the process.
    Regards
    Krishnendu

  • Which type of collection is suitable for below scenario?

    which type of collection is suitable for below scenario?
    A) session.getAttibute("userPref",dad_re);
    possible values inside session are rad_eu,tcd_nid,aa,iod_po
    B)Need to compare with below set of values .
    dad_re
    rad_eu
    aad_vv
    bbd_rt
    ccd_ff
    If matched
    sysout("Matched values"+rad_eu)
    else
      sysout("Non matching with B"+tcd_ni)
    A - will contain only one value for each time and it is superset
    Which collection will use to store B?

    A HashSet.

  • Which jdbc driver should be used for sqlserver 2000 and where to put it.

    hi all,
    My odi is 11g. I met the error infor "Could not load JDBC driver class [com.microsoft.sqlserver.jdbc.SQLServerDriver]" when i tried to connect to a sqlserver2000 database.
    The questions are:
    1. which jdbc driver should be used for sqlserver 2000?
    2. which folder to put it in?
    3. how to set the physical topological "Microsoft Sql Server" to use this jdbc driver?
    failed tries:
    i downloaded the driver "SQL Server 2000 Driver for JDBC Service Pack 2" and put it in the following folders:
    1. .../oracledi/drivers, and set this path to CLASSPATH.
    2. .../oracledi/userlib didn't exist, i created it and put the driver in.
    3. .../oracledi/agent/dirvers, in which a readme file exists and told me to put drivers in this folder.
    All these works were not useful. when I start odi.sh and try to connect to sqlserver2000 database, the same error infor came up.
    my environment is:
    os: Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    java: Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
    ODI: 11g, installed in /users/oracle/odi/
    please help me,thanks a lot.
    jun
    帖子经 Jun编辑过

    Hi,
    You should check which JVM version is required by that version of the driver, I think the 2.x versions require a 1.6 JVM
    What error are you getting? If it is the "com.sunopsis.sql.c: No suitable driver", it indicates it can't find the jar file (sqljdbc.jar) for the driver you specify.
    Drivers folder in ODI 11g is under
    C:\oracle\product\11.1.1\Oracle_ODI_1\oracledi\agent\drivers.
    if you are using the standolone version
    On windwos :
    C:\Documents and Settings\<userName>\Application Data\odi\oracledi\userlib
    on linux
    $HOME/.odi/oracledi/userlib
    Have a read of :- http://download.oracle.com/docs/cd/E14571_01/core.1111/e16453/install.htm#CHDBIFAJ
    Thanks,
    Sutirtha

Maybe you are looking for