nitgul
Thu 28th Aug '03, 4:24am
Hi Everybody,
I am facing a problem. I have 4 tables.
EMPLOYEES
USERS
LOCATION
ORGANIZATION
2 of these tables (EMPLOYEES AND USERS)have over 5 Lac records. I want to fetch all the records from these 4 tables.
I have this query
"SELECT EMPLOYEE.ID EMPLOYEE_ID, EMPLOYEE.FIRSTNAME EMPLOYEE_FIRSTNAME, EMPLOYEE.MIDDLEINIT EMPLOYEE_MIDDLEINIT, EMPLOYEE.LASTNAME EMPLOYEE_LASTNAME, ORGANIZATION.NAME ORGANIZATION_NAME, IUSER.ID USERID, EMPLOYEE.EMAILADDR EMPLOYEE_EMAILADDR, EMPLOYEE.DEPT EMPLOYEE_DEPT, EMPLOYEE.CODE EMPLOYEE_CODE, USER.CODE LOGINNAME, EMPLOYEE.LOCID EMPLOYEE_LOCID, LOCATION.CODE LOCATION_CODE, EMPLOYEE.COSTCENTERID EMPLOYEE_COSTCENTERID, ORGANISATION.ORGANISATIONCODE ORGANISATION_CODE, ORGANISATION.NAME RORGANISATION_NAME, SECURITYLEVELVALUE FROM EMPLOYEE LEFT JOIN ORGANISATION ON EMPLOYEE.ORGID = ORGANISATION.ID LEFT JOIN LOCATION ON EMPLOYEE.LOCID = LOCATION.ID LEFT JOIN USER ON USER.ID = EMPLOYEE.ID"
but when i run this query from my Java application, Nothing is returned for 5-6 mins and the after that system hangs. Same happens when i run the query on the command prompt of mysql. Even if i add "LIMIT 500" to the above query (both on command prompt and Java application) there are no results and system hangs after 5-6 mins. Configuration of my system is P4, 2.4 GHz, 512 MB RAM. Is there any way this problem can be solved.
Thanks in advance for the help. :)
I am facing a problem. I have 4 tables.
EMPLOYEES
USERS
LOCATION
ORGANIZATION
2 of these tables (EMPLOYEES AND USERS)have over 5 Lac records. I want to fetch all the records from these 4 tables.
I have this query
"SELECT EMPLOYEE.ID EMPLOYEE_ID, EMPLOYEE.FIRSTNAME EMPLOYEE_FIRSTNAME, EMPLOYEE.MIDDLEINIT EMPLOYEE_MIDDLEINIT, EMPLOYEE.LASTNAME EMPLOYEE_LASTNAME, ORGANIZATION.NAME ORGANIZATION_NAME, IUSER.ID USERID, EMPLOYEE.EMAILADDR EMPLOYEE_EMAILADDR, EMPLOYEE.DEPT EMPLOYEE_DEPT, EMPLOYEE.CODE EMPLOYEE_CODE, USER.CODE LOGINNAME, EMPLOYEE.LOCID EMPLOYEE_LOCID, LOCATION.CODE LOCATION_CODE, EMPLOYEE.COSTCENTERID EMPLOYEE_COSTCENTERID, ORGANISATION.ORGANISATIONCODE ORGANISATION_CODE, ORGANISATION.NAME RORGANISATION_NAME, SECURITYLEVELVALUE FROM EMPLOYEE LEFT JOIN ORGANISATION ON EMPLOYEE.ORGID = ORGANISATION.ID LEFT JOIN LOCATION ON EMPLOYEE.LOCID = LOCATION.ID LEFT JOIN USER ON USER.ID = EMPLOYEE.ID"
but when i run this query from my Java application, Nothing is returned for 5-6 mins and the after that system hangs. Same happens when i run the query on the command prompt of mysql. Even if i add "LIMIT 500" to the above query (both on command prompt and Java application) there are no results and system hangs after 5-6 mins. Configuration of my system is P4, 2.4 GHz, 512 MB RAM. Is there any way this problem can be solved.
Thanks in advance for the help. :)