 ANALYZE public.gtu_properties;
 ANALYZE public.gtu_place;
 ANALYZE public.collectors;
-ANALYZE public.donators;
+/*ANALYZE public.donators;*/
 ANALYZE public.identifications_abdc;
 ANALYZE public.taxon_identified;
 ANALYZE public.mineral_identified;

GRANT SELECT ON  public.gtu_properties TO d2viewer;
GRANT SELECT ON  public.gtu_place TO d2viewer;
GRANT SELECT ON  public.collectors TO d2viewer;
GRANT SELECT ON  public.donators TO d2viewer;
GRANT SELECT ON  public.identifications_abdc TO d2viewer;
GRANT SELECT ON  public.taxon_identified TO d2viewer;
GRANT SELECT ON  public.mineral_identified TO d2viewer;


CREATE TABLE public.darwin_flat_bis AS
(
  SELECT df.id, collection_ref, collection_name, expedition_ref, expedition_name, gtu_ref, 
         gtu_code, gtu_from_date, gtu_to_date, gtu_country_tag_value, taxon_ref, 
         case when taxon_name = '' then null::varchar else taxon_name end  as taxon_name, 
         taxon_level_ref, taxon_level_name, litho_ref, 
