RE: URGENT: Question on table storage
Hi, > I have the following table in mysql 5.0.20... > > employ > == > empid > date_time > site > > I am using this table to store all the websites accessed by each > employees. There is no primary key on that table since the same > employee will access more than 100 sites per day. If there is 100 > employees then the rows inserted per day will be ~ 100*100= 1. If > it grows till 2 months or 3 months then the table size will become > larger. As we all know the default table size in MySQl is 4 GB. > > Can anyone explain will it produce issues in the future? How to > overcome this? How to design a table for this scenario? maybe this is still correct: http://jeremy.zawodny.com/blog/archives/000796.html But perhaps you don't need it at all: 1 records * e.g. 300 byte = 300 byte/day 4GB = 4294967296 byte 4294967296 byte / 300 byte/day = 1431 days No issues for about 3 years. And after that time you could simply create a new table. hth, Tom Horstmann -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: URGENT: Question on table storage
On 2006-12-19 Prem wrote: > I am using this table to store all the websites accessed by each employees. I hope you're aware that your country might have data privacy laws, too.. > There is no primary key on that table since the same employee will access > more than > 100 sites per day. If there is 100 employees then the rows inserted per day > will be > ~ 100*100= 1. If it grows till 2 months or 3 months then the table size > will > become larger. As we all know the default table size in MySQl is 4 GB. Default table size maybe but a MyISAM table can grow beyond 4GB without problems. (just try it by inserting lines with a script) The general advice for handling such big tables is to either build a map table that maps long hostnames to numbers ("4" = "www.google.com") to safe space or to use one table per day and use a "Merge-Table" to access them all in one SELECT. bye, -christian- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]