|
whzhaha,
dingjun123 said twice you need to run "set serveroutput off" in sqlplus before you run the SQLs I provided in msg #3. You must have enabled serveroutput on somewhere, perhaps in glogin.sql. I didn't tell you to turn it off because people normally don't do that.
Before you run your good and bad SQLs, flush buffer cache (hope it won't affect other apps too much):
alter system flush buffer_cache;
That way, we can compare disk read numbers.
You can just attach a text file instead of an image. Or just show it on the web page if you know how to post with fixed-width font such as courier.
> select h.lat,h.lon,h.station_id stationId from busstation h where distance(30.002,120.1123,h.lat,h.lon)<=11500
> oracle需要100秒
> MYSQL下才0.11秒。
On Oracle, do you see a lot of disk activity and on MySQL, very little? If that's not the case, is CPU usage high on Oracle? There could be two causes, disk reads and CPU computation. I want to see which of the two plays the major role. If it's disk, what's Oracle's db_cache_size and pga_aggregate_target_size? If it's CPU, what are the CPU speeds on both machines?
Yong Huang |
|