Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Indexed view Expand / Collapse
Author
Message
Posted Monday, May 13, 2013 6:08 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:43 AM
Points: 109, Visits: 1,105
Hi

I have a table which is large and we just need the last 2 month of data.I want to archive the old data in another database and create a view of this table in main database.
Now the question :Is the indexes of table enough or we should create indexes on view in main database?
Post #1452066
Posted Monday, May 13, 2013 6:27 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 9:07 AM
Points: 25, Visits: 2,671
1. Technically, it is not an indexed view until you create an Clustered Unique Index on the view. So you do need atleast the Clustered Unique index to call it an indexed view.
2. Beyond that, any indexing requirements are best answered by your needs. I dont think a person not familiar with your database or app can answer that part. Look up some general guidelines on what indexes need to be created. Or read more into them here (http://www.sqlservercentral.com/stairway/72399/)
3. Finally, I dont think cross database indexed views are possible.
Post #1452070
Posted Tuesday, May 14, 2013 12:13 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:43 AM
Points: 109, Visits: 1,105
Thanks a lot
Yes according to your comments I try to create clustered index but I can not use with schema binding cross database :-(
Post #1452398
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse