Re: PostgreSQL FAQ
От | Bruce Momjian |
---|---|
Тема | Re: PostgreSQL FAQ |
Дата | |
Msg-id | 200202141718.g1EHISo07667@candle.pha.pa.us обсуждение исходный текст |
Список | pgsql-docs |
[ CC'ed to docs. Hope that is OK.] These are excellent points. I have merged items 3.5 and 3.6 as you suggested. They clearly should have been one item. As far as disk computation, you are correct also. I improperly estimated the size of integers in that file. I have created a more typical file of one integer and one 20-char length string and used that in the example. I also changed the text to say "up to five times" rather than "six times". My new example shows roughly three times increase so I think "up to five times" is much more accurate. I have updated CVS and the web page so you can see my exact changes. Thanks for the assistance. --------------------------------------------------------------------------- Viktor Vislobokov wrote: > Hello Bruce! > > At first, I'm sorry my bad English. > > I'm like PostgreSQL and I want to make little contribution to > this great work. > I translated PostgreSQL FAQ in Russian. My translation > based on PostgreSQL 7.2 distribution for RawHide Linux (Red Hat clone). > Can I send it to you, that you place it into official distribution? > I'm not professional translator, but I try to make quality > translation. > > After translation process, I have some questions and I > want to discuss it with you. > > > What you think about 3.5 and 3.6 questions? > I think, answers are duplicate. May be need > merge it? > > I read answer at question 4.6. > I not agree with it, because the data is incorrect. > > You are talking about 300,000 lines, 2 integer at line > and 2.4Mb total size in order text file. But > > 2.4*1024*1024 > ------------- = 8 bytes at line > 300,000 > > > Let line containts two integers > > 65535 22767 > > In this case - 10 digits plus space plus end line character = 12 bytes > > However, PostgreSQL INT type can store 4th bytes interger, i.e. > any integer from 0 to 0xFFFFFFFF in hex and from 0 to 4294967295 in > decimal.Thus, if a line in text file contains, for example > > 4294967295 4294967295 > > total size of this line will be 22 bytes! > > Finally, result is strongly depends of integer's values! > IMHO, If numbers will be large, database size can be even LESS > text file size. > > With best wishes, Victor Vislobokov > Perm, Russia > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-docs по дате отправления: