title: How to append a constant value to a relation in pig
body: <p>I want to keep the tuple count of a relation to do some calculation, what is the most efficient solution. Currently i approach it like this :</p>
  
  <pre><code>G4 = GROUP D ALL;
  E = FOREACH G4{
      total  = COUNT(D);
      GENERATE FLATTEN(D),total as total;     
  };
  </code></pre>
  
  <p>the above pig code snippet translate into a MapReduce job with only one reduce  ,which is very slow.</p>