Cached view with the ORDER BY clause

Cached view with the ORDER BY clause

book

Article ID: KB0080209

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0.x

Description

TDV will drop ORDER BY clause for cached view 

Issue/Introduction

Cached view with the ORDER BY clause

Resolution

Once a view or procedure's data is cached, it should be treated like a normal database table (unordered, unfiltered). When querying the cache table, if the results need to be ordered, a view should be created from the cached view or procedure to apply the ORDER BY. The ORDER BY clause is not preserved after caching.

We have to create formatting view on top of the cached view. Please follow below mentioned steps:

1. Create a new view using the cached view
2. Add the ORDER BY clause in the new view
3. The new view will return the results in the order specified in the ORDER BY clause. Please check query plan to confirm.