News for hackers. Stuff that matters.
Re:Scaling to 100M: MySQL Is a Better NoSQL by wvenable on Tuesday May 24, 2016 @03:43PM (#11764882)
To be fair, this article is about using MySQL as a NoSQL storage and so all of this advice is geared towards that use-case. I'd kill for so much traffic that any of this would be necessary as opposed to any RDBMS best-practices.

I do agree that UUIDs should be stored differently -- the use of varchar rather than a fixed length type for a primary key will hurt performance.

Re:Scaling to 100M: MySQL Is a Better NoSQL by agentgt on Tuesday May 24, 2016 @04:06PM (#11765062)
We use varchar for UUID (on postgres) which surprisingly hasn't been that terribly performance wise. And yes we do use varchar(36) although on postgres it doesn't really matter because I think almost all varchars are text.

I would love to switch to native UUID someday though.

Re:Scaling to 100M: MySQL Is a Better NoSQL by narfz on Tuesday May 24, 2016 @04:29PM (#11765213)
we did the same and then switched to the native UUID type. it eliminates the need for a unique index and we saw a drop in storage space by 1/2. it's totally worth converting UUID to the uuid field.

ALTER TABLE my_table ALTER COLUMN my_uuid TYPE uuid USING uuid::uuid;

Re:Scaling to 100M: MySQL Is a Better NoSQL by olavgg on Tuesday May 24, 2016 @05:12PM (#11765532)
And you want as much of the index as possible in RAM. When the index is 10 times larger than necessary and do not fit in your RAM, you get a very expensive performance penalty!
Re:Scaling to 100M: MySQL Is a Better NoSQL by StevePerkins on Wednesday May 25, 2016 @07:59AM (#11769104)
Same, but we use raw binary columns (i.e. "BINARY(16)" for MySQL and "BYTEA(16)" for PostgreSQL).

Conversion between the database-native UUID type and the application-layer UUID type is often so flaky (particularly with Java and JPA).

Re:Scaling to 100M: MySQL Is a Better NoSQL by elmigranto on Wednesday May 25, 2016 @05:39AM (#11768640)
All the `CHAR`s in Postgres are `TEXT`, from the docs:

Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs and slower sorting. In most situations text or character varying should be used instead.

Re:Scaling to 100M: MySQL Is a Better NoSQL by jdiscar on Tuesday May 24, 2016 @09:10PM (#11766940)
Yeah, VARCHAR and TEXT are backed by the same datatype, but VARCHAR(N) gives you a limit check (that can be a pain to change if you ever need to.) There shouldn't be any noticable performance difference. For UUIDs, the native type is way better.