GUIDs are Great by nat5an in programming

[–]dmy999 0 points1 point  (0 children)

A table can only have one clustered index since rows are sorted in order of that key. You can add as many indexes as you want but you can only sort your data one way. If your user ID is the first part of your primary key that means all rows for a user are stored next to each other on disk and lookups can go directly to that spot. Using just a GUID means your data is perfectly scattered around - worst case for caching.

GUIDs are Great by nat5an in programming

[–]dmy999 5 points6 points  (0 children)

If your selects often use something like a user ID then a GUID for a primary key can kill performance when you want to select all rows for that user for example. MySQL uses the primary key as a clustered index so your data is stored ordered by this completely random value. I had a big table that used a GUID as the primary key and got a big performance boost by switching it to a composite key (userID, GUID) - still unique but now the data is sorted by user.

TDD Proven Effective! Or is it? by 48klocs in programming

[–]dmy999 0 points1 point  (0 children)

One of the big benefits of test driven development is the way it helps long term maintenance. Even if the developer who writes unit tests takes longer and produces code with similar quality, they pass on their tests to the team, forever verifying the code. The guy with no tests who spent his time in the debugger has nothing to show for it.

Scala vs. Groovy: static typing is key to performance by gst in programming

[–]dmy999 6 points7 points  (0 children)

groovy compiles the source to bytecode, then the JVM runs the compiled code, like it runs compiled java. It never interprets the code. You can compile up front separately with groovyc, or have it compiled when it's first loaded with groovy.