I'm attempting to build a database with every pasuk in Tanach, I'm trying to determine the size of the varchar needed for this. Which pasuk is this and how many letters does it have?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The verse in Tanach with the most words is Esther 8:9 (source) with 43 words:
ויקראו ספרי המלך בעת ההיא בחדש השלישי הוא חדש סיון בשלושה ועשרים בו ויכתב ככל אשר צוה מרדכי אל היהודים ואל האחשדרפנים והפחות ושרי המדינות אשר מהדו ועד כוש שבע ועשרים ומאה מדינה מדינה ומדינה ככתבה ועם ועם כלשנו ואל היהודים ככתבם וכלשונם:
Since these words don't look so unusually short (and in fact contain one of the longest words in Tanach האחשדרפנים) and the next longest pasuk has only 41 words, I would guess this pasuk has the most letters as well, which by my count is 193 (235 if you count the spaces).
This doesn't answer your question, but in MySQL a varchar doesn't take extra disk space if you make it larger than necessary.
Are you storing in UTF-8, UTF-8-MB4, or 8859-8? The different types take different amounts of space. (3, 4, or 1 respectively, assuming you are using MySQL).
So you may just want to do varchar(65535) and not worry about it.
However if you anticipate lots of sorting operations the larger varchars do take extra temporary table space, which can slow things down. But if you sort via an index this is not a problem.
Hmm, I wonder if this is the wrong stackexchange site..... :)
Also, if your data source has nekudos the size depends on if you are storing the character composed or not. If they are not composed you need to double the space to account of the nekudos. (Although composed characters are somewhat preferred, so you should convert them.)