anchor.diff:      print "Keeping records later than %s" % retain_time
       print "Admin project '%s' (%s)" % (args.admin_tenant, admin_id)
   
  -    and_clause = "AND def.tenant_id != '%s'" % admin_id
  -    or_clause = "OR (def.tenant_id = '%s' AND def.name like 'vm.%%')" % \
  -                admin_id
  -
  -    if args.limit:
  -        limited_in_list = get_tenant_id_in_list(tenants, args.limit)
  -        and_clause = "AND def.tenant_id IN (%s)" % limited_in_list
  -        or_clause = ""
  -
  -    if args.ignore:
  -        ignore_in_list = get_tenant_id_in_list(tenants, args.ignore)
  -        and_clause = \
  -            "AND (def.tenant_id != '%s' AND def.tenant_id NOT IN (%s))" \
  -            % (admin_id, ignore_in_list)
  -
  -    delete_measurements_sql = """
  +    delete_sql = """
          DELETE
          FROM MonMetrics.Measurements
          WHERE time_stamp < '%s'
  
positive.code:        COMMIT;
      """
  
      vsql(delete_measurements_sql)
      vsql(delete_defdims_sql)
      vsql(delete_dims_sql)
      vsql(delete_defs_sql)
  
negative.code:             LEFT OUTER JOIN MonMetrics.Dimensions dims
                ON dims.dimension_set_id = defdims.dimension_set_id
         WHERE def.id = defdims.definition_id
         %s);
         COMMIT;
      """
      admin_clause = "AND def.tenant_id = '%s' AND def.name like 'vm.%%'" % \
                     admin_id
  
      if args.limit:
  
          print "Limiting pruning to projects '%s'" % args.limit
          limited_in_list = get_tenant_id_in_list(tenants, args.limit)
          non_admin_with_limit_clause = \
              "AND def.tenant_id != '%s' AND def.tenant_id IN (%s)" \
              % (admin_id, limited_in_list)
          vsql(delete_sql % (retain_time, non_admin_with_limit_clause))
  
      elif args.ignore:
  
          print "Ignoring pruning for projects '%s'" % args.ignore
          ignore_in_list = get_tenant_id_in_list(tenants, args.ignore)
          non_admin_with_ignore_clause = \
              "AND def.tenant_id != '%s' AND def.tenant_id NOT IN (%s)" \
              % (admin_id, ignore_in_list)
          vsql(delete_sql % (retain_time, non_admin_with_ignore_clause))
          vsql(delete_sql % (retain_time, admin_clause))
  
      else:
          non_admin_clause = "AND def.tenant_id != '%s'" % admin_id
          vsql(delete_sql % (retain_time, non_admin_clause))
          vsql(delete_sql % (retain_time, admin_clause))
  
      delete_defdims_sql = """
         DELETE FROM MonMetrics.DefinitionDimensions
  