Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
levani
Starting Member
5 Posts |
Posted - 2009-02-03 : 13:42:20
|
I have only 100mb for wordpress website and I would like to how many posts could I write if each post's lenght wouldn't be more then 1000 symbols... I don't know whether it's important or not but each post would be written in unicode...Thanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
revdnrdy
Posting Yak Master
220 Posts |
Posted - 2009-02-03 : 14:00:38
|
quote: Originally posted by levani I have only 100mb for wordpress website and I would like to how many posts could I write if each post's lenght wouldn't be more then 1000 symbols... I don't know whether it's important or not but each post would be written in unicode...Thanks
Well this seems simple enough..Find out what datatype is being used for the unicode character (nvarchar, varchar, or text). Then find out how much memory that datatype needs (ie.. 8 bytes, 16 bytes etc..)Multiply that value by 1000 to see how much memory a 1000 character message would consume. For example if 1 unicode character consumes 8 bytes then 1 post = 8 X 1000 or 8kbytes (assuming 1000 char post).8kbytes = 8000 Bytes100 MB = 1024 * 1024 * 100 = 104857600 Bytes104857600 /8000 = 13107 messages of length 1000 unicode chars.*This presumes all 100Mb of memory being used for posts. This is of course a naive solution and does not account for the other elements of your web that consume memory (like queries & such).r&r |
 |
|
levani
Starting Member
5 Posts |
Posted - 2009-02-03 : 14:08:39
|
quote: Originally posted by revdnrdy
quote: Originally posted by levani I have only 100mb for wordpress website and I would like to how many posts could I write if each post's lenght wouldn't be more then 1000 symbols... I don't know whether it's important or not but each post would be written in unicode...Thanks
Well this seems simple enough..Find out what datatype is being used for the unicode character (nvarchar, varchar, or text). Then find out how much memory that datatype needs (ie.. 8 bytes, 16 bytes etc..)Multiply that value by 1000 to see how much memory a 1000 character message would consume. For example if 1 unicode character consumes 8 bytes then 1 post = 8 X 1000 or 8kbytes (assuming 1000 char post).8kbytes = 8000 Bytes100 MB = 1024 * 1024 * 100 = 104857600 Bytes104857600 /8000 = 13107 messages of length 1000 unicode chars.*This presumes all 100Mb of memory being used for posts. This is of course a naive solution and does not account for the other elements of your web that consume memory (like queries & such).r&r
Well thank you very much for the exhaustive explanation. This information is really helpful for me. Thanks |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-02-03 : 14:32:44
|
1. Calculate needed space for a complete row in your table (simple addition of size of all columns)-- for example it results in 384 byte2. A page can hold 8064 byte of data (8192 - 128 for administrate the page)3. 8064 / 384 = 21 rows fit to one page4. 100 mb = 104857600 / 8192 = 12800 pages5. 12800 available pages * 21 rows = 268800 rows No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|