JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » JDBC/SQL討論區 » MySQL  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:MySQL 不支援的功能 [Re:Vicky]
richard





發文: 96
積分: 1
於 2005-04-21 09:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
road=# EXPLAIN ANALYZE
road-# select countStart from road_data;

QUERY PLAN

----------------------------------------------------------------------------------------------------------------------------

Aggregate (cost=245674.91..245674.91 rows=1 width=0) (actual time=95684.46..95684.46 rows=1 loops=1)
-> Seq Scan on road_data (cost=0.00..245316.53 rows=143353 width=0) (actual time=434.78..95538.32 rows=143504 loops=1)
Total runtime: 95684.51 msec

這是怎麼了~~~~


reply to postreply to post
作者 Re:MySQL 不支援的功能 [Re:richard]
powerouch





發文: 95
積分: 0
於 2005-04-21 11:31 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Post is deleted

powerouch edited on 2005-04-21 11:38
reply to postreply to post
唉呀,我又不小心上浮了!?
對不起,我是來灌水的XD
作者 Re:MySQL 不支援的功能 [Re:richard]
powerouch





發文: 95
積分: 0
於 2005-04-21 11:45 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
richard wrote:
road=# EXPLAIN ANALYZE
road-# select countStart from road_data;

QUERY PLAN

----------------------------------------------------------------------------------------------------------------------------

Aggregate (cost=245674.91..245674.91 rows=1 width=0) (actual time=95684.46..95684.46 rows=1 loops=1)
-> Seq Scan on road_data (cost=0.00..245316.53 rows=143353 width=0) (actual time=434.78..95538.32 rows=143504 loops=1)
Total runtime: 95684.51 msec

這是怎麼了~~~~

因為 call 了 aggregate function 的關係做了 full table scan
可是會慢成這樣有點誇張
您的 system configuration(軟硬體) 以及 query optimizer 的設定是?
另外 postgresql 支援幾種不同的 indexing method 可能也有影響
FYI,我自己也還在學習中Big Smile


reply to postreply to post
唉呀,我又不小心上浮了!?
對不起,我是來灌水的XD
作者 Re:MySQL 不支援的功能 [Re:Vicky]
ARF





發文: 35
積分: 0
於 2005-04-21 16:51 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我終於知道為什麼sun要推出EJB了...

原來EJB就是為了克服DBMS功能不同的這種狀況用的東西...

如果用EJB,就可以不用太care DBMS的能力了...


reply to postreply to post
作者 Re:MySQL 不支援的功能 [Re:Vicky]
richard





發文: 96
積分: 1
於 2005-04-24 17:38 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
這是3,4十萬雙cpu的IBM server
別以為這是aggregate function 造成的
告訴你 用有key where key ='XXX'
一樣 ~~>_<~~


reply to postreply to post
作者 Re:MySQL 不支援的功能 [Re:richard]
Shen





發文: 167
積分: 3
於 2005-04-24 21:15 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
richard wrote:
road=# EXPLAIN ANALYZE
road-# select countStart from road_data;

QUERY PLAN

----------------------------------------------------------------------------------------------------------------------------

Aggregate (cost=245674.91..245674.91 rows=1 width=0) (actual time=95684.46..95684.46 rows=1 loops=1)
-> Seq Scan on road_data (cost=0.00..245316.53 rows=143353 width=0) (actual time=434.78..95538.32 rows=143504 loops=1)
Total runtime: 95684.51 msec

這是怎麼了~~~~


給您做個參考~ 我的配備如下!
CPU:P4 3.0G
MEM:Kingstone 1G DDR400
HDD:Maxtor 120G 8M

PostgreSQL 8.0 on WindowsXP

EXPLAIN ANALYZE select countStart from fourm2;

--------------------------------------------------------------------------------

"Aggregate (cost=22391.00..22391.00 rows=1 width=0) (actual time=2797.000..2797.000 rows=1 loops=1)"
" -> Seq Scan on fourm2 (cost=0.00..20641.00 rows=700000 width=0) (actual time=0.000..1500.000 rows=700000 loops=1)"
"Total runtime: 2797.000 ms"


reply to postreply to post
作者 Re:MySQL 不支援的功能 [Re:richard]
powerouch





發文: 95
積分: 0
於 2005-04-25 11:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
richard wrote:
這是3,4十萬雙cpu的IBM server
別以為這是aggregate function 造成的
告訴你 用有key where key ='XXX'
一樣 ~~>_<~~

既然如此
那問題就是在別的地方
我就是不知道你的環境
才只能瞎猜Dead
重點不是你的機器值多少$$
而是管的人值多少$$


powerouch edited on 2005-04-25 11:44
reply to postreply to post
唉呀,我又不小心上浮了!?
對不起,我是來灌水的XD
作者 Re:MySQL 不支援的功能 [Re:Vicky]
richard





發文: 96
積分: 1
於 2005-04-28 10:29 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
如果資料是不變動的...
或是剛initail copy進去
就有你這個速度..

但一用久...約半年到一年....
就會越來越可怕
使用volumn也一樣

mysql就沒這個問題

"而是管的人值多少$$ "
是呀,,請你教一下..如何可以做到select有key的幾萬筆可以超過好幾分鐘
我看..這在mysql 功力不強還真做不到


reply to postreply to post
go to first page go to previous page  1   2  go to next page go to last page
» JWorld@TW »  JDBC/SQL討論區 » MySQL

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8