db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georgi Hristov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3892) Query execution hangs
Date Tue, 14 Oct 2008 18:53:44 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639537#action_12639537
] 

Georgi Hristov commented on DERBY-3892:
---------------------------------------

Thanks a lot for your detailed analysis I really appreciate it a lot. I can give you one hint
with which I manage to execute the query for the 100,000 rows: just remove the first call
to doQuery() in the doSingleDriver() method, then the query lasts for not more than 6 seconds.
So from my point of view most probably there is some faulty implementation, which maybe caches
something, and makes the subsequent calls to the same query, after the data in the target
tables has been modified, to take forever. 
Anyway I'm a bit surprised that you accept a behaviour like 50,000 rows for 20 minutes ? Have
you ever tried other implementations like Derby, for example HSQLDB ? Do you have any performance
benchmarks for Derby DB in embedded mode ? It is really crucial for the application we want
to deliver to have a high performance DB which can handle a load of several hundred thousand
rows. And moreover we want this DB to be Derby and to add a new successor for Derby DB.

> Query execution hangs
> ---------------------
>
>                 Key: DERBY-3892
>                 URL: https://issues.apache.org/jira/browse/DERBY-3892
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.4.1.3, 10.4.2.0
>         Environment: OS: Windows Vista
> Application environment: Java 1.5 Swing Application using Derby DB in the embedded mode
as part of the application.
>            Reporter: Georgi Hristov
>         Attachments: derby_50kRows.log, Main.java, Main_Bryan.java, Main_Updated.java
>
>
> Having the following db schema:
> CREATE TABLE Messaged_Users (ACCOUNT_ID VARCHAR(20) NOT NULL, 
>       USER_ID VARCHAR(20) NOT NULL,
>       DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
>       STATUS INT DEFAULT 0,
>       CONSTRAINT PK_ACC_USER_ID PRIMARY KEY (ACCOUNT_ID, USER_ID))
> CREATE TABLE Users (USER_ID VARCHAR(20) NOT NULL CONSTRAINT USER_ID_PK PRIMARY KEY, 
>       USER_NAME VARCHAR(50) NOT NULL)
> with approximately 100,000 records in each table and trying to execute the following
query:
>       PreparedStatement searchStatement = conn.prepareStatement("SELECT b.USER_ID, b.USER_NAME
FROM Users a JOIN Messaged_Users b ON    a.USER_ID=b.USER_ID AND a.ACCOUNT_ID=(?)");
>       searchStatement.setString(1, "5533232");
>       ResultSet foundUsers = searchStatement.executeQuery();
> the executeQuery method actually never ends. I've waited for more than 30 mins and it
didn't finish. I've tried it really many times but without any progress the query just hangs.
I presume that this is definitely a bug in the derby db which should be fixed. Please note
also that this fix is very urgent for us so that we can deliver our application. 
> Thanks in advance for looking into this issue.
>  
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message