Zolf
asked on
Convert View into Tables in MSSQL 2008
Hello there,
I have taken some complex SQL query and converted them into View so I can us in my Java application. Now I want to know, if I convert these Views into Table will the report be faster and Can I in the first place create tables directly from those query instead of first creating a View and then Table.
cheers
Zolf
I have taken some complex SQL query and converted them into View so I can us in my Java application. Now I want to know, if I convert these Views into Table will the report be faster and Can I in the first place create tables directly from those query instead of first creating a View and then Table.
cheers
Zolf
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Vitor Montalvão
Thanks for your feedbacks.
CAn you please tell me how can I create index on the view I created.
Thanks for your feedbacks.
The advantages of the Views is that the data are dynamic and don't requires storage.Do you mean if the data in those table from which I created the view will change the view will get those data updated automatically or I need to again run the create View to update those data.
CAn you please tell me how can I create index on the view I created.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, can you please refer me to some good article where I can create index for View.
Also how can I know if the tables column has index
Also don't forget that only deterministic Views can be indexed.Can you please elaborate on deterministic Views
Also how can I know if the tables column has index
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys
If you transform a View into a table, then you'll need to manage the new table, running the same operations that runs in the main tables. Can't see why you want to do that.
Not all Views can be materialized. Only deterministic Views can. Also, will require storage and if you need to change the View in the future will need to drop the index and recreate the View. But can be a solution instead of creating a new table.