If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Create Index to a view

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-04, 03:54
anwyuta anwyuta is offline
Registered User
 
Join Date: Sep 2004
Posts: 24
Create Index to a view

hi,

is it possible to create an index to a view?

Our environment is a DB2 on AS/400 V5R3

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 11-09-04, 04:14
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
index on view

according the help this is not possible - doesn not seems logic either.
why would you create an index just for one view
if the index is on a table - all views can use it - because a query is always run against a table and not a view
Best Regards, Guy Przytula
Reply With Quote
  #3 (permalink)  
Old 11-09-04, 05:37
anwyuta anwyuta is offline
Registered User
 
Join Date: Sep 2004
Posts: 24
the view contains an union statement...

so i see no option to set an order by clause
to the view... thats the reason for an index

any idea to set an order by clause to a view?
Reply With Quote
  #4 (permalink)  
Old 11-09-04, 05:55
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
index on view

select * from view order by xxx
Guy Przytula
Reply With Quote
  #5 (permalink)  
Old 11-10-04, 03:25
anwyuta anwyuta is offline
Registered User
 
Join Date: Sep 2004
Posts: 24
select * from view order by xxx ... ;-))

i need the order by statement at the creation of the view...

the select... order by... "great idea" ...

thanks for your help...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On