<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VIEW in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564335#M584924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since there is nothing Physical for a view, I think when we fetch from the View database optomizer can use the INDICES of the individual tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it will clearly help if we have the fields in the same sequence as we have for the Tables involved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A query on a view will just be again resolved on to a JOIN query so INDICES can play some role there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still good one to think about &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2007 09:16:39 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-07-27T09:16:39Z</dc:date>
    <item>
      <title>VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564329#M584918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While getting data from DB tables we will make use of indexes. If the same to be retrieved from a view...what is the retrieval mechanism?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume View v1 has fields f1,f2,f3,f4 and while making query on V1 will it improve performance...if we provide conditions in Where clause as the same sequence which matches with View fields sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any body clariry?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564329#M584918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T09:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564330#M584919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes it will be more faster. it will definately improve. you can directly place your select stmt on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if help ful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Azad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564330#M584919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T09:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564331#M584920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Retrieving data through views&lt;/P&gt;&lt;P&gt;When you retrieve data through a view, Adaptive Server checks to make sure that all the database objects referenced anywhere in the statement exist and that they are valid in the context of the statement. If the checks are successful, Adaptive Server combines the statement with the stored definition of the view and translates it into a query on the view's underlying tables. This process is called view resolution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the following view definition statement and a query against it: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create view hiprice &lt;/P&gt;&lt;P&gt;as select * &lt;/P&gt;&lt;P&gt;from titles &lt;/P&gt;&lt;P&gt;where price &amp;gt; $15 &lt;/P&gt;&lt;P&gt;and advance &amp;gt; $5000 &lt;/P&gt;&lt;P&gt;select title, type &lt;/P&gt;&lt;P&gt;from hiprice &lt;/P&gt;&lt;P&gt;where type = "popular_comp" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internally, Adaptive Server combines the query of hiprice with its definition, converting the query to: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select title, type &lt;/P&gt;&lt;P&gt;from titles &lt;/P&gt;&lt;P&gt;where price &amp;gt; $15 &lt;/P&gt;&lt;P&gt;and advance &amp;gt; $5000 &lt;/P&gt;&lt;P&gt;and type = "popular_comp" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, you can query any view in any way just as if it were a real table. You can use joins, group by clauses, subqueries, and other query techniques on views, in any combination. Note, however, that if the view is defined with an outer join or aggregate function, you may get unexpected results when you query the view. See "Views derived from other views". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use select on text and image columns in views. However, you cannot use readtext and writetext in views.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;View resolution&lt;/P&gt;&lt;P&gt;When you define a view, Adaptive Server verifies that all the tables or views listed in the from clause exist. Similar checks are performed when you query through the view. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Between the time a view is defined and the time it is used in a statement, things can change. For example, one or more of the tables or views listed in the from clause of the view definition may have been dropped. Or one or more of the columns listed in the select clause of the view definition may have been renamed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fully resolve a view, Adaptive Server verifies that: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the tables, views, and columns from which the view was derived still exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The datatype of each column on which a view column depends has not been changed to an incompatible type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the statement is an update, insert, or delete, it does not violate the restrictions on modifying views. These are discussed under "Modifying data through views".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any of these checks fails, Adaptive Server issues an error message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Redefining views&lt;/P&gt;&lt;P&gt;Adaptive Server allows you to redefine a view without forcing you to redefine other views that depend on it, unless the redefinition makes it impossible for Adaptive Server to translate the dependent view. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the authors table and three possible views are shown below. Each succeeding view is defined using the view that preceded it: view2 is created from view1, and view3 is created from view2. In this way, view2 depends on view1 and view3 depends on both the preceding views. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each view name is followed by the select statement used to create it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create view view1&lt;/P&gt;&lt;P&gt;as select au_lname, phone &lt;/P&gt;&lt;P&gt;from authors &lt;/P&gt;&lt;P&gt;where postalcode like "94%"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create view view2&lt;/P&gt;&lt;P&gt;as select au_lname, phone &lt;/P&gt;&lt;P&gt;from view1 &lt;/P&gt;&lt;P&gt;where au_lname like "[M-Z]%"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view3:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create view view3&lt;/P&gt;&lt;P&gt;as select au_lname, phone &lt;/P&gt;&lt;P&gt;from view2 &lt;/P&gt;&lt;P&gt;where au_lname = "MacFeather" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The authors table on which these views are based consists of these columns: au_id, au_lname, au_fname, phone, address, city, state, and postalcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can drop view2 and replace it with another view, also named view2, that contains slightly different selection criteria, such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create view view2&lt;/P&gt;&lt;P&gt;as select au_lname, phone&lt;/P&gt;&lt;P&gt;from view3&lt;/P&gt;&lt;P&gt;where au_lname like "[M-P]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;view3, which depends on view2, is still valid and does not need to be redefined. When you use a query that references either view2 or view3, view resolution takes place as usual. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you redefine view2 so that view3 cannot be derived from it, view3 becomes invalid. For example, if another new version of view2 contains a single column, au_lname, rather than the two columns that view3 expects, view3 can no longer be used because it cannot derive the phone column from the object on which it depends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, view3 still exists and you can use it again by dropping view2 and re-creating view2 with both the au_lname and the phone columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short, you can change the definition of an intermediate view without affecting dependent views as long as the select list of the dependent views remains valid. If this rule is violated, a query that references the invalid view produces an error message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Renaming views&lt;/P&gt;&lt;P&gt;You can rename a view using sp_rename: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sp_rename objname , newname  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, to rename titleview to bookview, enter: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sp_rename titleview, bookview &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow these conventions when renaming views:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure the new name follows the rules used for identifiers discussed under "Identifiers". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can change the name only of views that you own. The Database Owner can change the name of any user's view. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure the view is in the current database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Altering or dropping underlying objects&lt;/P&gt;&lt;P&gt;You can change the name of a view's underlying objects. For example, if a view references a table entitled new_sales, and you rename that table to old_sales, the view will work on the renamed table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if a table referenced by a view has been dropped, and someone tries to use the view, Adaptive Server produces an error message. If a new table or view is created to replace the one that was dropped, the view again becomes usable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you define a view with a select * clause, and then alter the structure of its underlying tables by adding columns, the new columns do not appear. This is because the asterisk shorthand is interpreted and expanded when the view is first created. To see the new columns, drop the view and re-create it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564331#M584920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T09:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564332#M584921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do the samething with view like normal &lt;/P&gt;&lt;P&gt;but performance wil be bad when compare to the normal tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Regards,&lt;/P&gt;&lt;P&gt;Azhar&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564332#M584921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T09:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564333#M584922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as far as select there will be no difference in writing it, only thing there will be some performance issue but if it is requried they we can always take the performence into consideration&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:14:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564333#M584922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T09:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564334#M584923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a view does'nt contain key but u should consider keys of included tables in the view also same for tables indexes. &lt;/P&gt;&lt;P&gt;u'r performance will definitely improve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't forget to reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:14:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564334#M584923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-27T09:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: VIEW</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564335#M584924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since there is nothing Physical for a view, I think when we fetch from the View database optomizer can use the INDICES of the individual tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it will clearly help if we have the fields in the same sequence as we have for the Tables involved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A query on a view will just be again resolved on to a JOIN query so INDICES can play some role there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still good one to think about &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2007 09:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/view/m-p/2564335#M584924</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-27T09:16:39Z</dc:date>
    </item>
  </channel>
</rss>

