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

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

Thanks for the quick response and the useful advices. I want to point out that 
this issue report do not  target performance regression as desribed in the 
provided link but simply demonstrates that the described query just hangs, or 
lets say that depending on the amount of records in the table, the time needed 
for the query to finish rises exponentially. I thought that it will be 
interesting for you to try it out locally as from my point of view it is very 
easy to set up the environment locally. I've provided the table descriptions, 
just insert about 100,000 records in each, and run the query. I hoped that by 
reporting the issue directly to you, instead of trying to analyze the execution 
plan or even debug derby's code, I'll finally reach to the solution/bug fix, 
but I thought that you can do it faster than me and this is really important 
for application delivery date. Please let me know if you will to try it on your 
side or will leave me to struggle on my own.  

> 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
>
> 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.

Reply via email to