CREATE TABLE new_TABLE AS old_TABLE WITH DATA AND STATS
Also DISTINCT will be useful. If both DISTINCT and COUNT(*) returns same number then there are no duplicates.
With more duplicates GROUP BY is more efficient while if we have fewer duplicates the DISTINCT is efficient.
Both has the Date and Time Values. The major difference is that TIMESTAMP (6) has microsecond too.
Spool space is the space which is required by the query for processing or to hold the rows in the answer set. Spool space reaches maximum when the query is not properly optimized. We must use appropriate condition in WHERE clause and JOIN on correct columns to optimize the query. Also make sure unncessary volatile tables are dropped as it occupies spool space.
It stores the exact no of characters stored in varchar
- Only users can login, establish a session with Teradata database and they can submit requests
SELECT HASHAMP(HASHBUCKET(HASHROW(PI_COLUMN))),COUNT(*) FROM TABLENBAME GROUP BY 1.