All, I am running solaris 2.6 with oracle815. The following sql is taking a long time to run; Can some one help optimize this. Thanks.

$QUERY1 = "
SELECT p.station_call, p.station, p.city_code, c.city_name, m.monitor, m.channel
FROM monitor_station m, starcd_cities c, port_map p
WHERE p.station = m.station_id and m.city_code = p.city_code \
and c.city_code = m.city_code and c.city_code \
NOT IN ('90') and station_call != 'WYNY'
ORDER BY c.city_name";

$sth_stations = $dbh->prepare("$QUERY1");
$sth_stations->execute;


$QUERY2= "select ((sysdate - d.activity_date) * 24) \
from detections d, port_map p \
where d.city_code=p.city_code \
and d.city_code= :city and p.station_call= :station \
and p.station=d.station_id \
order by d.activity_date desc";
$sth_detections = $dbh->prepare("$QUERY2") || die $DBI::errstr;"