全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:4044
推到 Plurk!
推到 Facebook!

firebird安裝時可選擇兩種server他們有什麼不同嗎?

答題得分者是:danny
ry_lee
高階會員


發表:368
回覆:251
積分:123
註冊:2002-03-19

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-11-19 17:20:01 IP:220.131.xxx.xxx 訂閱
firebird安裝時可選擇兩種server他們有什麼不同嗎?  (Firebird-2.0.3.12981-1-Win32.exe)
1.預設是super server,另一是classic server , super server似乎不支援smp , 請問這是否也表示super server不支援多核心cpu,是否表示其效率輸classic server 因為classic server 支援smp?
2.大家大都裝那一個server?
3.好像這兩種server都無提供boolean欄位?該怎麼解決?

danny
版主


發表:100
回覆:522
積分:595
註冊:2002-03-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-11-19 22:36:09 IP:203.79.xxx.xxx 訂閱
firebird安裝時可選擇兩種server他們有什麼不同嗎? (Firebird-2.0.3.12981-1-Win32.exe)
1.預設是super server,另一是classic server , super server似乎不支援smp ,
請問這是否也表示super server不支援多核心cpu,是否表示其效率輸classic server 因為classic server支援smp?


關於這個問題可以參考 Firebird-2.0-QuickStart.pdf 中的說明
Classic or Superserver?
Firebird comes in two flavours, called architectures: Classic Server and Superserver. Which one should you
install? That depends on your situation. A short overview of the most important differences follows.

As you can see, neither of the architectures is better in all respects. This is hardly surprising: we wouldn't maintain
two separate architectures if one of them was an all-fronts loser.
If you're still not sure what to choose (maybe you find all this tech talk a little overwhelming), use this rule
of thumb:
On Windows, choose Superserver.
• On Linux, just pick one or the other. In most circumstances, chances are that you won't notice a performance
difference.
Note that you can always switch to the other architecture later; your applications and databases will keep functioning
like before.
For Linux, Superserver download packages start with FirebirdSS, Classic packages with FirebirdCS. For
Windows, there is a combined installation package; you choose the architecture during the installation process.

2.大家大都裝那一個server?


我都是使用 Superserver,目前 好像所看到的也是使用 Superserver 居多

3.好像這兩種server都無提供boolean欄位?該怎麼解決?

解決辦法有很多種, ex: 設 Varchar(1) T -> True, F -> False, 設 Interge 1 -> True, 0 -> False
"據說" Firebird 以後會支援 Boolean datatype, 不過已經說很久了 ...

===================引 用 ry_lee 文 章===================
firebird安裝時可選擇兩種server他們有什麼不同嗎? (Firebird-2.0.3.12981-1-Win32.exe)
1.預設是super server,另一是classic server , super server似乎不支援smp , 請問這是否也表示super server不支援多核心cpu,是否表示其效率輸classic server 因為classic server 支援smp?
2.大家大都裝那一個server?
3.好像這兩種server都無提供boolean欄位?該怎麼解決?
------
將問題盡快結案也是一種禮貌!
ry_lee
高階會員


發表:368
回覆:251
積分:123
註冊:2002-03-19

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-11-19 23:26:29 IP:220.131.xxx.xxx 訂閱
danny版主你好:

1.這一段內容我不了解,可否告知?

No SMP support. On multi-processor Windows
machines, performance can even
drop dramatically as the OS switches the
process between CPUs. To prevent this, set
the CpuAffinityMask parameter in the
configuration file firebird.conf.

2.紅色地方要怎麼設定?
編輯記錄
ry_lee 重新編輯於 2007-11-19 23:35:35, 註解 無‧
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#4 引用回覆 回覆 發表時間:2007-11-20 00:52:21 IP:61.67.xxx.xxx 未訂閱
請你到安裝的firebird 目錄下找一個 firebird.conf 檔, 其中都是以 # 被remark , 也就是系統都採用default
找到下列
# ===========================
# SuperServer Engine Settings
# ===========================
#
# ----------------------------
# Which CPUs should be used (Windows Only)
#
# In an SMP system, sets which processors can be used by the server.
# The value is taken from a bit map in which each bit represents a CPU.
# Thus, to use only the first processor, the value is 1. To use both
# CPU 1 and CPU 2, the value is 3. To use CPU 2 and CPU 3, the value
# is 6. The default value is 1.
#
# Type: integer
#
#CpuAffinityMask = 1
把 紅色的這個 # 掉, 然後參照上段的說明設定應該就可以了, 不過我沒有實作, 不保證可行,
因為現在的設備要支援到advance server(多cpu)的太少太少了

另外 firebird(interbase)不支援boolean, 如danny版主說的, 用string方式宣告, 不過不同的看法, 做為boolean的欄位最好使用char格式, 因為varchar有null值的認定, 也就是該欄位不填入F 就是NULL, 如果你想判斷非T的欄位, 這樣寫的SQL一定有問題
MYFIELD<>'T', 因為這樣無法抓出NULL值,
正確的寫法是 MYFILED<>'T' or MYFILED IS NOT NULL
但如果使用 CHAR(1)的話, 就可以寫 MYFIELD <>'T' 就一定錯不了, 因為FB 為自動為 CHAR 填入 CHR(32), 絶對不會是NULL

另外, 你還有一篇討論, 如版務大人所說, 結案也是一種禮貌, 這樣我們才知道是否還有做後續的解答!
編輯記錄
P.D. 重新編輯於 2007-11-20 00:59:39, 註解 無‧
danny
版主


發表:100
回覆:522
積分:595
註冊:2002-03-11

發送簡訊給我
#5 引用回覆 回覆 發表時間:2007-11-20 14:22:45 IP:203.79.xxx.xxx 訂閱
如同 P.D. 版主所言是要改 firebird.conf 中的設定, 不過我以前試過其實不用改設定, 讓 Firebird 自己管理 performance 是最好的
Firebird 有很多東西文件很少(這是 Firebird 的缺點), 必須自己去測試, 也許你可以將測試結果分享出來給大家參考.
至於 Boolean datatype 解決方式, P.D. 版主所提供的方法確實比較好, 也謝謝 P.D. 版主.

===================引 用 ry_lee 文 章===================
danny版主你好:

1.這一段內容我不了解,可否告知?

No SMP support. On multi-processor Windows
machines, performance can even
drop dramatically as the OS switches the
process between CPUs. To prevent this, set
the CpuAffinityMask parameter in the
configuration file firebird.conf.

2.紅色地方要怎麼設定?
------
將問題盡快結案也是一種禮貌!
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#6 引用回覆 回覆 發表時間:2007-11-21 01:12:17 IP:61.67.xxx.xxx 未訂閱
哈! 這是因為我的切身之痛, 以前我也是用varchar,我不知道這個原理, 結果到客戶那邊使用3個月後, 客戶發現數據都不對, 我追了兩個月的時間才發現是這個原因(一共追了數十萬筆記錄, 向客戶賺的錢都賠掉了), 所以有機會就告訴大家不要重蹈覆轍啦!
danny
版主


發表:100
回覆:522
積分:595
註冊:2002-03-11

發送簡訊給我
#7 引用回覆 回覆 發表時間:2007-11-21 07:22:37 IP:211.76.xxx.xxx 訂閱
真是貴的學費啊! 
感謝您的心得分享 ....

===================引 用 P.D. 文 章===================
哈! 這是因為我的切身之痛, 以前我也是用varchar,我不知道這個原理, 結果到客戶那邊使用3個月後, 客戶發現數據都不對, 我追了兩個月的時間才發現是這個原因(一共追了數十萬筆記錄, 向客戶賺的錢都賠掉了), 所以有機會就告訴大家不要重蹈覆轍啦!
------
將問題盡快結案也是一種禮貌!
系統時間:2024-05-02 18:06:55
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!