查看完整版本 : MYSQL Design problem

linuxfedora 2018-12-11 11:39 AM

MYSQL Design problem

1. If i have a record need to insert to a table in each 1/10 second and expect to store for 10 or more years, then it could have 3,153,600,000 records, is it too much for a single table? If yes, what should improve?
The table will store something likes:
PrimaryId|ProductId|TransactionPrice|TransactionDate|TransactionState

form5 2018-12-11 10:05 PM

之前分table ok 喎,
Producti 最多咪幾萬,吾使分table,
TransactionID auto increment, 一路增加,去到某個位味開多個table, 
TransactionProduct 一樣開多個table,  幾時開,你要做 profiling .

cuhkrain 2018-12-12 06:54 AM

do.not use mysql.... even one month, it will be very slow for a simple select .....sql server is better

linuxfedora 2018-12-12 09:22 AM

[quote]原帖由 [i]form5[/i] 於 2018-12-11 10:05 PM 發表 [url=https://computer.discuss.com.hk/redirect.php?goto=findpost&pid=491858036&ptid=27904790][img]https://computer.discuss.com.hk/images/common/back.gif[/img][/url]
之前分table ok 喎,
Producti 最多咪幾萬,吾使分table,
TransactionID auto increment, 一路增加,去到某個位味開多個table,
TransactionProduct 一樣開多個table,  幾時開,你要做 profiling . ... [/quote]


TransactionID auto increment, 一路增加,去到某個位味開多個table開多個table

開多個table 咁要做query 咪要做兩個Transaction tables??

form5 2018-12-12 10:25 PM

[quote]原帖由 [i]linuxfedora[/i] 於 2018-12-12 09:22 AM 發表 [url=https://computer.discuss.com.hk/redirect.php?goto=findpost&pid=491872799&ptid=27904790][img]https://computer.discuss.com.hk/images/common/back.gif[/img][/url]

TransactionID auto increment, 一路增加,去到某個位味開多個table開多個table

開多個table 咁要做query 咪要做兩個Transaction tables?? [/quote]
你search 之前 己經知道 用邊個table 嘛,同時你都吾會改,比如一二個月前嘅transaction 內容, transaction datetime 己經分到 用邊個 table啦

linuxfedora 2018-12-13 03:16 PM

[quote]原帖由 [i]form5[/i] 於 2018-12-12 10:25 PM 發表 [url=https://computer.discuss.com.hk/redirect.php?goto=findpost&pid=491906594&ptid=27904790][img]https://computer.discuss.com.hk/images/common/back.gif[/img][/url]

你search 之前 己經知道 用邊個table 嘛,同時你都吾會改,比如一二個月前嘅transaction 內容, transaction datetime 己經分到 用邊個 table啦 [/quote]


Ok, Thanks
頁: [1]
查看完整版本: MYSQL Design problem