Tuesday, May 15, 2012

Greenplum's distribution keys

Greenplum is a distributed database.  Specifically, when you create a table, it creates the same table on all it's child nodes and distributes out the data based on the key you provide.   If you omit the key, Greenplum uses round-robin to distribute the data, and you can get nodes end up shouldering too much of the load.   At ClickFox we had an issue with omitted and bad distribution keys.   I wrote this 'little' query this afternoon to generate a report on all the distribution keys.  Hopefully someone find it useful:



SELECT pgn.nspname,
       pgc.relname,
       pga.attname
FROM   (SELECT gdp.localoid,
               CASE
                 WHEN ( Array_upper(gdp.attrnums, 1) > 0 ) THEN
                 Unnest(gdp.attrnums)
                 ELSE NULL
               END AS attnum
        FROM   gp_distribution_policy gdp
        ORDER  BY gdp.localoid) AS distrokey
       INNER JOIN pg_class AS pgc
         ON distrokey.localoid = pgc.oid
       INNER JOIN pg_namespace pgn
         ON pgc.relnamespace = pgn.oid
       LEFT OUTER JOIN pg_attribute pga
         ON distrokey.attnum = pga.attnum
            AND distrokey.localoid = pga.attrelid
ORDER  BY pgn.nspname,
          pgc.relname 

Tuesday, February 14, 2012

Iterative business

Just watched this Martin Fowler presentation.  It gets interesting around 10 minutes, so skip there is you're impatient.   I want to highlight when Jez asks why waste 2 years delivering something that will need to be changed when you can deliver it in 2 months and start iterating on it, so at the end of 2 years people actually got something they wanted. 


Thoughtworks presentation on continuous delivery


This is fascinating to me because my pal Worldnamer and I have always bounced ridiculous business ideas off each other, and then one day became fascinated by the guys at this site:

AppSumo tells how to build a business in a weekend

In a nutshell, while App Sumo is just selling videos full of potentially dubious information, they have a central tenant to their message, that is very parellel to Jez's idea.   Just get your business going.  It doesn't matter if it's a bit ghetto at first.  Don't waste time and money on bad ideas.  Find out they are bad quickly.

So it seems that an idea that many entrepreneurs have shared for a long time, is just now making it's way into enterprise software development.  This make me wonder how many more ideas can be lifted from the 'entrepenurial' world and applied to enterprise development.

Wednesday, February 1, 2012

Is ColdFusion dead?

Some people got to know me when I was a ColdFusion developer, or as I like to describe it, an unhappy developer.  For old times sake I decided to hit up some of the more prominent CF sites and see what this fantastic language is proffering up to its acolytes these days.   There has been a major release every year for many years EXCEPT 2011 and Adobe seems to be silent about whats coming next.  Even some of Adobe's paid pundits are pretty silent on the topic.  Could it be dead?  Let's all sneak away silently and hope so.

Tuesday, January 24, 2012

Learning Unity

At work we decided to use Unity 3D to develop some of our properties, primarily for it's cross platform capabilities.  For the scripting side of Unity we're going with C#.  I think I'm going to capitalize on this opportunity to learn some real front end skills.  I'm installing Unity now as I write this.  We'll see what comes of it.  My goal is to implement one of my many boardgame ideas.  Wish me luck!