19,220 reputation
12861
bio website
location Vienna, Austria
age 94
visits member for 2 years, 10 months
seen 6 hours ago

8h
reviewed Edit Query for frequency of e-mail addresses in a field
8h
revised Query for frequency of e-mail addresses in a field
trim noise, typo
9h
revised PL/pgSQL function or rCTE to detect depth of relations between two tables
added 6 characters in body
9h
revised PL/pgSQL function or rCTE to detect depth of relations between two tables
modify title, trim some noise, add tags
9h
answered PL/pgSQL function or rCTE to detect depth of relations between two tables
11h
comment PL/pgSQL function or rCTE to detect depth of relations between two tables
Do you just need the depth as result or the complete path also?
11h
comment Trying to set up automatic process to append and update tuples
You need to ask an actual question.
13h
revised For alignment optimized table is bigger than original table - why?
edited tags
13h
comment For alignment optimized table is bigger than original table - why?
OK, NULL values change the calculation. I leave it at that.
13h
comment For alignment optimized table is bigger than original table - why?
And the size for real3d is actually 33+3 (compare to fiddle for your last Q). The padding between tuples does not show in pg_column_size(t). All-in-all your old rows with all values NOT NULL (no null bitmask) occupied 128 bytes on disk (not 138) and the new one 72 as you wrote. That's 56 bytes per row. And would amount to saving ~ 406 MB (SELECT pg_size_pretty(56.0 * 7604913)). Did you change anything else, or are there NULL values involved?
13h
revised For alignment optimized table is bigger than original table - why?
fromat to remove horizontal ruler
14h
comment For alignment optimized table is bigger than original table - why?
The last two rows in your original design should actually read 2+2 and 4+4. Each tuple is padded to the next MAXALIGN at the end. Plus, remember that actual NULL columns are not stored at all. Just an entry in the null bitmask - which may also change the padding on following values.
14h
comment For alignment optimized table is bigger than original table - why?
@tomka: Nice. 286 MB saved and the rest should be a bit faster, too.
14h
revised For alignment optimized table is bigger than original table - why?
edited body
14h
comment For alignment optimized table is bigger than original table - why?
@tomka: The size of the old table (1020 MB) is after VACUUM FULL, too?
14h
revised For alignment optimized table is bigger than original table - why?
added 80 characters in body
14h
answered For alignment optimized table is bigger than original table - why?
19h
comment Select script for selecting two columns in a table
It's not always clear. This seems like a basic issue though. Maybe, you can draw the line there: If you are experience with SQL and still puzzled by a problem, come here. If you are a beginner, you should generally go to SO.
1d
comment Update new column with value from old columns for all the rows
Concurrent load means that multiple clients (potentially) read / write at the same time to the table in question. Writing is a lot more tricky than just reading. You should know whether that is the case.
1d
revised Select script for selecting two columns in a table
edited tags