Performance with LinkedList in java

Hello All,
Please suggest me any solution to further improve the performance with List.
The problem description is as follows:
I have a huge number of objects, lets say 10,000 , and need to store the objects in such a collection so that if i want to store an object at some particular index i , I get the best performance.
I suppose as I need indexed based access, using List makes the best sense as Lists are ordered.
Using LinkedList over ArrayList gives the better performance in the aforementioned context.
Is there are way I can further improve the performance of LinkedList while solving this particular problem
OR
Is there any other index based collection using that i get better performance than LinkedList?
Thanks in advance

The trouble with a LinkedList as implemented in the Java libraries is that if you want to insert at index 100, it has no option but to step through the first 100 links of the list to find the insert point. Likewise is you retrieve by index. The strength of the linked list approach is lost if you work by index and the List interface gives no other way to insert in the middle of the list. The natural interface for a linked list would include an extended Iterator with methods for insert and replace. Of course LinkedLists are fine when you insert first or last.
My guess would be that if your habitual insertion point was half way or more through the list then ArrayList would serve you better especially if you leave ample room for growth. Moving array elements up is probably not much more expensive, per element, than walking the linked list. Maybe 150% or thereabouts.
Much depends on how you retrieve, and how volatile the list is. Certainly if you are a read-mostly situation and cannot use an iterator then a LinkedList won't suit.

Similar Messages

  • Performance issue with Business Objects Java JRC API in CRXI R2 version

    A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
    While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
    exportControl.processHttpRequest(request, response, context, null)
    We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
    Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
    In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
    Any suggestion, hint in this matter is very much appreciated.

    Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
    But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
    As per the crj 12 samples codes, the code is written as shown below.
    1. Created ReportClient Document
    2. SetReportAppServer
    3. Open the report
    4. Getting DatabaseController and switching the database connection at runtime
    5. Then setting the parameters as detailed below
    ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    parameterFieldController.setCurrentValue("", "paramname",paramvalue);
    parameterFieldController.setCurrentValue("", "paramname",paramavalue);
    byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF); 
    6. Streaming the report to the browser
    Why the parematers are not being passed to the report?  Do I need to follow the order of setting these parameters?  Did I miss any line of code for setting Params using  crj 12?
    Any help in this regard would be greatly appreciated.

  • BEA / Wily:  Financial Webinar - Achieving Availability, Performance and Control of Java Applications in Financial Services

    Event Date: October 1, 2002 at 11:00 AM Pacific (US), 02:00 PM Eastern (US)
    To register: http://regsvc.placeware.com/?wily-bea1001
    Title: Achieving Availability, Performance and Control of Java Applications
    in Financial Services
    Abstract:
    In today's competitive environment, financial institutions must focus on
    three key business goals:
    a.. Creating a customer-centric enterprise to maximize value to customers
    and increase share of wallet
    b.. Improving transactional efficiency for rapid delivery of the right
    products, services and information to customers and to employees
    c.. Accelerating the decision making process to mitigate risk and improve
    returns.
    BEA and Wily Technology have helped a number of financial services firms
    meet these objectives by delivering high-performance business solutions that
    meet rigorous demands for performance, reliability and scalability.
    On October 1, 2002, Wily Technology and BEA will present a joint Web seminar
    titled "Achieving Availability, Performance and Control of Java Applications
    in Financial Services" with Eric Gudgion, Principal System Architect,
    Technical Solutions Group at BEA and Chris Farrell, Director of Technical
    Marketing at Wily. This Webinar will showcase the many advantages that the
    WebLogic® Enterprise PlatformT and Wily's Introscope® offer financial
    services firms.
    Attendees will learn how WebLogic Server, BEA's unified, simplified and
    extensible solution, provides a robust platform for the development and
    deployment of enterprise Java applications. Some examples of what financial
    institutions can achieve with BEA include Multi-channel Services Delivery,
    Straight-Through Processing, Wealth Management and Cash Management.
    Wily Technology will highlight Introscope's ability to manage financial
    services Java applications by pinpointing component-level performance issues
    in real-time, whether in the application, application server or
    Java-connected back-end systems. Wily's suite of Java application management
    solutions offers a comprehensive platform for achieving 24x7 application
    availability, enhanced performance and better control of IT resources.

    First of all you should check out which products are supported on 64bit :- http://www.oracle.com/technology/products/bi/hyperion-supported-platforms.html
    If you are planning on using windows 64bit EAS then you will have to manually deploy the web application, it cannot be automatically deployed.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Want to Generate custom logs with Log4J within Java Embedding activity

    Hi Gurus,
    i want to Generate custom logs with Log4J within Java Embedding activity. For that i have performed some steps, but the log file has not been created.
    ServerSide Configuration:
    *===============*
    1. I have copied the log4j-1.2.15.jar file to the "oracle.soa.ext_11.1.1" location and recreate the oracle.soa.ext.jar file using an-script, which appends the log4j.jar file to the classpath.( That was created successfully)
    2. Specify a File location in log4j.xml for creating the log file. (e.g. (<middleware_home>/config/customLog.log)
    3. Then create a folder and add log4j.xml and log4j.dtd file under the folder.
    4. Modify the startManagedWeblogicServer by adding JAVA_OPTIONS="-Dlog4j.configuration=<middleware_home>/config/log4j.debug.xml”
    5. Then restart the SOA server.
    log4j.xml :
    I have used fileAppender.
    DevelopmentSide Configuration:
    *===================*
    1. Create synchronous BPEL process and Add "JAVA Embedding Activity" inbetween receiveInput and replyOutput activity.
    2.Import the log4j-1.2.15.jar to the project libs
    3.In the BPEL source code, import the Logger class.
    4.Insert the code in the JAVA Embedding Activity
    Logger logger = Logger.getLogger("CustomLog");
    logger.info("CustomeLog " + getTitle());
    Compile and deploy the project into the SOA_server and test it. Test status is completed but log is not created in the mentioned location.
    Ref: http://blog.andrade.inf.br/search/label/Log4j
    Is there any other way to achieve this requirement. Please suggest.
    Thanks in Advance,
    Sharmistha

    You can try this.
    http://veejai24.blogspot.co.uk/2008/04/simple-way-to-implement-log4j-in-your.html
    Thanks,
    Vijay

  • How to connect with Oracle in java

    Hello!
    I would like to use java for my graduation project. And connect with Oracle in java.
    I used j2sdk1.4.2_04 and Oracle 9i release 9.2.0.1.0
    May I ask where could supply me information or content ?
    Thanks!!

    hi jus a sample code
    public class DbUtil {
    // Connection instance
    private static Connection conn = null;
    private Object connection;
    public DbUtil() {
         // Connect to the database
    dbConnect();
    * This method performs the clean up action and closes the application
    void exitDbUtil(){
    // If connected to database
    if (conn != null) {
    try {
    // Close the connection
    conn.close();
    conn=null;
    catch (Exception ex){      // Trap errors
    System.out.println(" Error while Closing the connection: "+ex.toString());
    * Creates a database connection object
    private void dbConnect() {
    try {
    String driverName = "oracle.jdbc.driver.OracleDriver";
    Class.forName(driverName);
    String url = "jdbc:oracle:thin:@" + ConnectionParams.s_hostName +
              ":" + ConnectionParams.s_portNumber +
              ":" + ConnectionParams.s_databaseSID;
    // Create a connection object
    conn = DriverManager.getConnection(url, ConnectionParams.s_userName,
                             ConnectionParams.s_password);
    catch(Exception e){

  • Help with a SIMPLE java thing

    I've only got ONE handful of hair left.
    I'm trying to build a series of dropdown boxes; a day dropdown (Mon, Tue, Wed...), a month dropdown (Jan, Feb, Mar...), a year dropdown, hour dropdown, minute dropdown, and an am/pm dropdown.
    I think I want to build my dropdowns using "for" loops something like this:
    for (i=0;i<12;i++) {
    myStringBuffer.append("<option>" + [someUnknownFunctionThatReturnsTheFirstThreeLettersOfTheMonth(i)] + "</option>")
    I've been trying to mix up various combinations of Date objects (most date functions seem to be depreciated), Calendar Objects, DateFormat Objects and SimpleDateFormat Objects but nothing seems to want to perform the function that I need.
    I've had iffy success creating a calendar object, setting the Month to "i", using the getTime function to return a Date object which I can then pass to the SimpleDateFormat object using the .format(Date) function, after setting the pattern to "EEE", but it seems like just an incredibly complicated way to do what ought to be a simple function...i.e. convert a number 0-11 (or 1-12, I'm not picky) into the name of a stinking Month! Arrgh.
    If anyone can help, I thank you.

    I've done that before, so i'll share it with you.
    import java.text.SimpleDateFormat;
    import java.text.DateFormatSymbols;
    import java.util.Calendar;
    import java.util.Date;
    public String createListOfMonth(String pName) {
    StringBuffer sbMonth = new StringBuffer();
    DateFormatSymbols fm = new DateFormatSymbols();
    String[] arrMonth = fm.getMonths();
    sbMonth.append("<select name=\"" + pName + "\">");
    sbMonth.append("     <option value=\"\">Month</option>\n");
    for (int i=0; i<arrMonth.length; i++) {
    if (!arrMonth.trim().equals("")) {
    String sValue = "0000" + (i + 1);
    sValue = sValue.substring(sValue.length() - 2);               
    sbMonth.append("     <option value=\"" + sValue + "\">" + arrMonth[i] + "</option>\n");
    sbMonth.append("</select>");
    return (sbMonth.toString());
    You can manipulate the symbol (either for months, days) using different locale. You can see the API for java.text.DateFormatSymbols in Java2 SE.
    Regards,
    Hariyanto

  • Report  performance with Hierarchies

    Hi
    How to improve query performance with hierarchies. We have to do lot of navigation's in the query and the volume of data size very big.
    Thanks
    P G

    HI,
    chk this:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
    Query Performance – Is "Aggregates" the way out for me?
    /people/vikash.agrawal/blog/2006/04/17/query-performance-150-is-aggregates-the-way-out-for-me
    ° the OLAP cache is architected to store query result sets and to give all users access to those result sets.
    If a user executes a query, the result set for that query’s request can be stored in the OLAP cache; if that same query (or a derivative) is then executed by another user, the subsequent query request can be filled by accessing the result set already stored in the OLAP cache.
    In this way, a query request filled from the OLAP cache is significantly faster than queries that receive their result set from database access
    ° The indexes that are created in the fact table for each dimension allow you to easily find and select the data
    see http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    ° when you load data into the InfoCube, each request has its own request ID, which is included in the fact table in the packet dimension.
    This (besides giving the possibility to manage/delete single request) increases the volume of data, and reduces performance in reporting, as the system has to aggregate with the request ID every time you execute a query. Using compressing, you can eliminate these disadvantages, and bring data from different requests together into one single request (request ID 0).
    This function is critical, as the compressed data can no longer be deleted from the InfoCube using its request IDs and, logically, you must be absolutely certain that the data loaded into the InfoCube is correct.
    see http://help.sap.com/saphelp_nw04/helpdata/en/ca/aa6437e7a4080ee10000009b38f842/content.htm
    ° by using partitioning you can split up the whole dataset for an InfoCube into several, smaller, physically independent and redundancy-free units. Thanks to this separation, performance is increased when reporting, or also when deleting data from the InfoCube.
    see http://help.sap.com/saphelp_nw04/helpdata/en/33/dc2038aa3bcd23e10000009b38f8cf/content.htm
    Hope it helps!
    tHAK YOU,
    dst

  • Are there Issues with poor performance with Maverick OS,

    Are there issues with slow and reduced performance with Mavericks OS

    check this
    http://apple.stackexchange.com/questions/126081/10-9-2-slows-down-processes
    or
    this:
    https://discussions.apple.com/message/25341556#25341556
    I am doing a lot of analyses with 10.9.2 on a late 2013 MBP, and these analyses generally last hours or days. I observed that Maverick is slowing them down considerably for some reasons after few hours of computations, making it impossible for me to work with this computer...

  • [SOLVED] Problem with Vuze and Java RE x86_64

    Hello all !
    First of all, sorry if this issue was posted before, but find no related issue similar to mine.
    Using pacman, I successfully installed JRE (version 6u16-1-x86_64) and Vuze (version 4.2.0.8-1, former Azureus), but Vuze doesn't want to start.
    Running the Vuze's executable in the gnome-terminal, I notice messages from vuze informing it can't find Java executable ("Java exec not found in PATH, starting auto-search..." AND "OOPS, unable to locate java exec in /usr/java/latest /usr/java /usr/lib/jvm/latest /usr/lib/jvm hierarchy") and therefore cannot start the Vuze UI. I also tried but failed in verify the version of Java with the command "java -version" due to command not found.
    What is the best approach to fix this problem with Java 64 bits?
    Thanks in advance
    Last edited by josephg (2009-09-28 18:55:56)

    peart wrote:Just log out and back in, most likely.  There are scripts in /etc/profile.d/ that need to be run to set up your java environment.  They get run automatically when you log in.
    Yep, perfect answer - issue solved. Thanks a lot!

  • Problem with win2000sp3 and Java web start

    I have JRE and Java web start (1.2.0_01, build b01) which come downloading file j2re-1_4_1_01-windows-i586-i.exe from sun.
    I have win2000pro running on my PC.
    I had updated win2000 to service pack 2 and everything was fine.
    Now i decided to update to service pack 3 (in the process I also updated other components) from Microsoft and:
    1) Java applets seem to be running fine within i.e.
    2) If i try to run an application from java web start my PC freezes and I have to restart it.
    3) Staroffice 6.0, which runs on Java, seems to be fine.
    I reinstalled both sp3 and jre etc, with no result.
    Is this a known problem?
    Thanks to all.
    Maurizio

    I suspect that you have hit a known problem with Swing on Java 1.4.1 with buggy video drivers. Do you have an ATI card? They are the worst offenders. ATI released new drivers for its Radeon line today. They fix the problem.

  • Performance with the new Mac Pros?

    I sold my old Mac Pro (first generation) a few months ago in anticipation of the new line-up. In the meantime, I purchased a i7 iMac and 12GB of RAM. This machine is faster than my old Mac for most Aperture operations (except disk-intensive stuff that I only do occasionally).
    I am ready to purchase a "real" Mac, but I'm hesitating because the improvements just don't seem that great. I have two questions:
    1. Has anyone evaluated qualitative performance with the new ATI 5870 or 5770? Long ago, Aperture seemed pretty much GPU-constrained. I'm confused about whether that's the case anymore.
    2. Has anyone evaluated any of the new Mac Pro chips for general day-to-day use? I'm interested in processing through my images as quickly as possible, so the actual latency to demosaic and render from the raw originals (Canon 1-series) is the most important metric. The second thing is having reasonable performance for multiple brushed-in effect bricks.
    I'm mostly curious if anyone has any experience to point to whether it's worth it -- disregarding the other advantages like expandability and nicer (matte) displays.
    Thanks.
    Ben

    Thanks for writing. Please don't mind if I pick apart your statements.
    "For an extra $200 the 5870 is a no brainer." I agree on a pure cost basis that it's not a hard decision. But I have a very quiet environment, and I understand this card can make a lot of noise. To pay money, end up with a louder machine, and on top of that realize no significant benefit would be a minor disaster.
    So, the more interesting question is: has anyone actually used the 5870 and can compare it to previous cards? A 16-bit 60 megapixel image won't require even .5GB of VRAM if fully tiled into it, for example, so I have no ability, a priori, to prove to myself that it will matter. I guess I'm really hoping for real-world data. Perhaps you speak from this experience, Matthew? (I can't tell.)
    Background work and exporting are helpful, but not as critical for my primary daily use. I know the CPU is also used for demosaicing or at least some subset of the render pipeline, because I have two computers that demonstrate vastly different render-from-raw response times with the same graphics card. Indeed, it is this lag that would be the most valuable of all for me to reduce. I want to be able to flip through a large shoot and see each image at 100% as instantaneously as possible. On my 2.8 i7 that process takes about 1 second on average (when Aperture doesn't get confused and mysteriously stop rendering 100% images).
    Ben

  • Performance with Boot Camp/Gaming?

    Hi,
    I just acquired a MBP/2GHz IntelCD/2GB RAM/100GB/Superdrive, with Applecare. Can anyone comment about the performance with
    Boot Camp -- running Windows XP SP2, and what the gaming graphics are like?
    Appreciate it, thanks...
    J.
    Powerbook G4 [15" Titanium - DVI] Mac OS X (10.4.8) 667MHz; 1GB RAM; 80GB

    Well, I didn't forget to mention what I did not know yet.... So that's not exactly correct..
    As per Apple's support page, http://support.apple.com/specs/macbookpro/MacBook_Pro.html
    My new computer does have 256MB of video memory...

  • Performance with external display

    Hello,
    when I'm connecting my 19'' TFT to the MacBook the performance (with the same applications runnig) is realy bad. It tooks longer to switch between apps and if I don't use an app for some time, it can took up to 30 sec to "reactivate" the app.
    Because the HD is working when I switch apps, it looks like the OS is swapping. My question: Would it help to upgrade the MacBook to 2GB ram? AFAIC the intel card uses shared memory.
    Thanks for your help
    Till
    MacBook 1.83 GHz/1GB   Mac OS X (10.4.8)  

    How much RAM do you have? Remember that the MB does not have dedicated VRAM like some computers do and that it uses the system RAM to drive the graphics chipset.
    I use my MB with the mini-DVI to DVI adapter to drive a 20" widescreen monitor without any of the problems that you describe, but I have 2GB of RAM. If you only have the stock 512MB of RAM, that may be part of what you are seeing.

  • Performance with dates in the where clause

    Performance with dates in the where clause
    CREATE TABLE TEST_DATA
    FNUMBER NUMBER,
    FSTRING VARCHAR2(4000 BYTE),
    FDATE DATE
    create index t_indx on test_data(fdata);
    query 1: select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    query 2: select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    query 3: select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_date('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    My questions:
    1) Why isn't the index t_indx used in Execution plan 1?
    2) From the execution plan, I see that query 2 & 3 is better than query 1. I do not see any difference between execution plan 2 & 3. Which one is better?
    3) I read somewhere - "Always check the Access Predicates and Filter Predicates of Explain Plan carefully to determine which columns are contributing to a Range Scan and which columns are merely filtering the returned rows. Be sceptical if the same clause is shown in both."
    Is that true for Execution plan 2 & 3?
    3) Could some one explain what the filter & access predicate mean here?
    Thanks in advance.
    Execution Plan 1:
    SQL> select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1486387033
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 517 (20)| 00:00:07 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | TABLE ACCESS FULL| TEST_DATA | 341 | 3069 | 517 (20)| 00:00:07 |
    Predicate Information (identified by operation id):
    2 - filter(TRUNC(INTERNAL_FUNCTION("FDATE"))=TRUNC(SYSDATE@!))
    Note
    - dynamic sampling used for this statement
    Statistics
    4 recursive calls
    0 db block gets
    1610 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed
    Execution Plan 2:
    SQL> select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1687886199
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 3 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | FILTER | | | | | |
    |* 3 | INDEX RANGE SCAN| T_INDX | 283 | 2547 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(TRUNC(SYSDATE@!)<=TRUNC(SYSDATE@!)+.9999884259259259259259
    259259259259259259)
    3 - access("FDATE">=TRUNC(SYSDATE@!) AND
    "FDATE"<=TRUNC(SYSDATE@!)+.999988425925925925925925925925925925925
    9)
    Note
    - dynamic sampling used for this statement
    Statistics
    7 recursive calls
    0 db block gets
    76 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows
    Execution Plan 3:
    SQL> select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_dat
    e('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    COUNT(*)
    283
    Execution Plan
    Plan hash value: 1687886199
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 9 | 3 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 9 | | |
    |* 2 | FILTER | | | | | |
    |* 3 | INDEX RANGE SCAN| T_INDX | 283 | 2547 | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter(TO_DATE('21-APR-10','dd-MON-yy')<=TO_DATE('21-APR-10
    23:59:59','DD-MON-YY hh24:mi:ss'))
    3 - access("FDATE">=TO_DATE('21-APR-10','dd-MON-yy') AND
    "FDATE"<=TO_DATE('21-APR-10 23:59:59','DD-MON-YY hh24:mi:ss'))
    Note
    - dynamic sampling used for this statement
    Statistics
    7 recursive calls
    0 db block gets
    76 consistent gets
    0 physical reads
    0 redo size
    412 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed

    Hi,
    user10541890 wrote:
    Performance with dates in the where clause
    CREATE TABLE TEST_DATA
    FNUMBER NUMBER,
    FSTRING VARCHAR2(4000 BYTE),
    FDATE DATE
    create index t_indx on test_data(fdata);Did you mean fdat<b>e</b> (ending in e)?
    Be careful; post the code you're actually running.
    query 1: select count(*) from TEST_DATA where trunc(fdate) = trunc(sysdate);
    query 2: select count(*) from TEST_DATA where fdate between trunc(sysdate) and trunc(SYSDATE) + .99999;
    query 3: select count(*) from TEST_DATA where fdate between to_date('21-APR-10', 'dd-MON-yy') and to_date('21-APR-10 23:59:59', 'DD-MON-YY hh24:mi:ss');
    My questions:
    1) Why isn't the index t_indx used in Execution plan 1?To use an index, the indexed column must stand alone as one of the operands. If you had a function-based index on TRUNC (fdate), then it might be used in Query 1, because the left operand of = is TRUNC (fdate).
    2) From the execution plan, I see that query 2 & 3 is better than query 1. I do not see any difference between execution plan 2 & 3. Which one is better?That depends on what you mean by "better".
    If "better" means faster, you've already shown that one is about as good as the other.
    Queries 2 and 3 are doing different things. Assuming the table stays the same, Query 2 may give different results every day, but the results of Query 3 will never change.
    For clarity, I prefer:
    WHERE     fdate >= TRUNC (SYSDATE)
    AND     fdate <  TRUNC (SYSDATE) + 1(or replace SYSDATE with a TO_DATE expression, depending on the requirements).
    3) I read somewhere - "Always check the Access Predicates and Filter Predicates of Explain Plan carefully to determine which columns are contributing to a Range Scan and which columns are merely filtering the returned rows. Be sceptical if the same clause is shown in both."
    Is that true for Execution plan 2 & 3?
    3) Could some one explain what the filter & access predicate mean here?Sorry, I can't.

  • Error BEA-000438 - Unable to load performance pack. Using Java I/O instead.

    On a Solaris 9 machime, 64 bits architecture, j2sdk1.4.2_08, Weblogic Server 8.1 SP2
              when I try to deploy the application, launching java wiht "-d64" option I get :
              <Jun 22, 2005 12:12:41 PM CEST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead.
              Please ensure that libmuxer library is in
              :'/export/home/j2se/j2sdk1.4.2_08/jre/lib/sparcv9/server:/export/home/j2se/j2sdk1.4.2_08/jre/lib/sparcv9:/export/home/Aplics/Apl1/WEB-INF/lib::/usr/local/bea/weblogic81/server/lib/solaris:/usr/local/bea/weblogic81/server/lib/solaris/oci920_8:/usr/lib'
              libmuxer exist on /usr/local/bea/weblogic81/server/lib/solaris
              Any idea?
              Thanks

              Can you post more details ?
              Sergi
              Jiffy <[email protected]> wrote:
              >error:
              > <2004-3-12 %u4E0B%u534815%u65F648%u520654%u79D2 CST> <Error> <Socket>
              ><BEA-000438> <Unable to load performance pack. Using Java I/O instead.
              >Please ensure that wlntio.dll is in: 'D:D:/bea/weblogic81/server/bin'
              >>
              

Maybe you are looking for

  • Non-english keyboard layouts work in some programs, not others

    In some programs, I can set a non-English keyboard layout and have the appropriate behavior when it comes to diacritics - in, say, the brazilian layout, hitting { then a will give me a á, and so on. It works perfectly fine in Firefox and xchat, for i

  • Sending document to only Private folder using SO_OBJECT_SEND

    Hi , I am able to send a mail to SAP Office private folder according to  my requirement . The issue is: 1)The mail is going to both the INBOX and the Private folder.    I want to restrict the mail to INBOX..and it shud only got to PRivate folder dire

  • Group Calendar Error in UWC

    Hi, We are having a problem in view Group Calendar, After creating group calendar and adding members, when we try to view it in UWC, it gives following error: Calendar Not Available* Could Not Display View* The selected calendar(s) was either deleted

  • Stateless Session EJB hangs using URLConnection but WLS doesn't clean up

    Hi We have a stateless session EJB running under WLS 5.1 with service pack 10 on Solaris. The bean calls a remote HTTP server using the java.net.URLConnection class and forwards the response to the EJB client. The bean is largely working fine but som

  • Envelope Stuck On

    The envelope symbol denoting a new text message is on but there's no message. Is there a way of clearing it? Thanks