Re: SELECT took lengthy of time
Posted by:
Man Fan
Date: August 28, 2010 05:42AM
Hi,
1)
The query
select *
from stationlog
where airdate >= '2010-03-01' and airdate >= '2010-03-31'
returned ~50000 records.
However, this is just one of the selects, I might need
Sometime I need to query for a year:
eg.
select *
from stationlog
where airdate >= '2009-03-01' and airdate >= '2010-03-31'
This is for using in the report.
2)
In addition, I need to do a join with other tables:
The query
select sl.*, e.EmployeeName, c.CityName, ...etc
from stationlog sl
left join city c ON c.CityCode = sl.CityCode
left join employee e ON e.EmployeeID = sl.EmployeeID
where sl.airdate >= '2010-03-01' and sl.airdate >= '2010-03-31'
3)
Yes, as I use a OPF in Delphi generating the primary using GUID, ie strip off the open and close braces.
The OPF people recommended me to use GUID to generate the primary key rather than using auto-increment.
4)
The other tables query seems OK.
The problem normally happened in the report generating because the user may request a yearly report so the query needs to query a year-long records.
Subject
Written By
Posted
Re: SELECT took lengthy of time
August 28, 2010 05:42AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.