@JohnK.N. Hi - you say "slightly more stable" - which implies some level of instability. What sort of issues have you experienced? With respect to Oracle? "Performance is better.". Better than what? Oracle? MySQL? Reads/Writes? I'm interested in the opinions of those who have used both proprietary and Open Source systems in production - many shops are single server only - when one only has a hammer, everything turns into a nail! :-)
Seriously though, I've worked with Oracle in the past and I know that it's a beast of a system in both the good and bad senses of the word - functionality up the wazoo, but many, many buttons & knobs to twiddle. PostgreSQL has ~ 300 parameters in postgresq.conf. Anyway, interested in your opinion!
@JohnK.N. The database on PostgreSQL just run. Indefinitely. Without issues. MySQL database have occasional locking issues, which don't seem to occur in PostgreSQL.
Maybe it has to do with how the developers develop for MySQL (with the various engines you can select) compared to developers for PostgreSQL.
PostgreSQL and MySQL probably attract a different crowd and/or mindset of developers.
@dezso I believe that "internet scale" is part of the ISO-XYZ-9999-2022 buzzword-compliance standard - usually said in the same breath as "cloud native"!
Well… both. Mainly the online aspect of it. For example, existing indexes prevent me from changing that as well so I have to drop and recreate even though the data is not changed
That's where I am now. Is there a reason I should care?
I think the optimizer won't care about the source of the NOT NULL guarantee (whether it's a NOT NULL definition or a check constraint). But I didn't test the assumption yet
but by the same logic. If I introduce a trusted check constraint, is there any reason why changing the definition of the column now would force the engine to check every record or rewrite the rows? Other than that it's probably not programmed
exploring this train of thought even further - if this is all possible, then it could be an internal implementation. I wouldn't have to create a constraint and then change the definition, it would all be done automatically when I issue ALTER COLUMN… NOT NULL
It's not a metadata-only change, though I suppose it could be, if they put enough effort in. You'd just be spreading the cost of rewriting the records over time though, assuming they're ever updated.
@Zikato Many of the effects (e.g. on optimization) would be the same, but the metadata still says the column allows nulls, and the physical pages are laid out for a nullable column e.g. null bitmap.
One could argue the nonclustered index wouldn't need to change if there would still be at least one nullable column in it after the column of interest was changed to NOT NULL, but this is getting a bit silly. And there might be some edge case idk.
@dezso Apologies for my earlier flippancy - I think that "internet scale" means a) distributed and b) has a large number of compute nodes and/or users. My earlier point about it being vague stands - what is a "large number" of users/nodes?
> “The automated tooling that Netflix has developed lets us quickly deploy large scale Cassandra clusters, in this case a few clicks on a web page and about an hour to go from nothing to a very large Cassandra cluster consisting of 288 medium sized instances, with 96 instances in each of three EC2 availability zones in the US-East region...
> ...Using an additional 60 instances as clients running the stress program, we ran a workload of 1.1 million client writes per second. Data was automatically replicated across all three zones making a total of 3.3 million writes per second across the cluster.”
This isn't really an answer - I think you should delete it and turn it into a comment - you're asking for clarification from the OP! — Vérace3 hours ago
@Vérace I had already done the same comment. And seems to be a valid solution to the OP's question.