Hi,
I am writing a view within which i have some restriction to apply.
Following is my current working query :
REPLACE VIEW person_view AS LOCKING ROW FOR ACCESS SELECT distinct date_time , person_id , person_key , name , address FROM _person a inner join (select max(date_time) as max_date_time , person_id as max_person_id , person_key as max_person_key from _person group by max_person_id , max_person_key) b on a.date_time = b.max_date_time and a.person_id = b.max_person_id and a.person_key = b.max_person_key;
The above query works but i am not sure about:
- Performance of the query ?
- Is there a possibility to create a volatile table. It should be better as its indexed.
- How does TERADATA handle the inner table ?
Appreciate your inputs.
Forums: