sql - distinct on 4 billion records -


in teradata consider scenario have more 4 billion records in table , need execute distinct/group on column not part of primary or secondary index , not partitioned.

now taking time. there other way of achieving this.

this standalone environment , can not copy data , neither have access create new table in environment. select access have.

if need number of unique values column help statistics {database}.{tablename} provide columns statistics , number of unique values. in teradata 14 or later, can perform show statistics values column {column} on {database}.{tablename}; command provide more details histograms including biased values column. biased values may encompass of unique values column or first few hundred. permissions on table may or may not permit this.

if using statistics out of question because don't exist or don't have sufficient permissions going end scanning table. having statistics collected on column information result in full table scan.

finally, depending on table , column investigating may find data dictionary maintained data modeler(s) have expected domain column. may have completed data profiling against table obtain information.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -