The astronomical data deluge: The template case of photometric redshifts