Search Postgresql Archives
Limits of arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I found a rather strange but working method to compare the contents of two tables in different databases:
select 'otformularfeld' as which, md5(array_to_string(array(
select md5(id_pkff||id_formular||id_formfeld||id_bf) from otformularfeld where quarant=0 order by id_pkff
),''))
So:
- basically I take the relevant columns from a table
- cast them to text and concattenate the strings
- find the md5 hash of this row
- then take the md5 of all rows, concattenate them to string
- and finally find the md5 of this string
That works surprisingly fast and gives a quick check "data in those 2 tables is the same or not".
Now, the maximum rowcount in one table so far is 180000; and still
there is no crash. Are there limits for the maximum "rows" in one
arrays?
Limits the maximum length of one string?
The only near information I could find in the documentations was "1 GB
per field", which will propably be the size limit for the array and the
string. Are there more limits?
Or is that md5 / concattenation process done in an iterative manner,
that is: all the intermediate results are consumed and not cached in
memory?
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]