Archives of the TeradataForum
Message Posted: Fri, 14 Jan 2011 @ 14:52:27 GMT
| Subj: || || Re: Database View Limits |
| From: || || Dieter Noeth |
David Clough wrote:
| ||We're considering creating another Database that holds every View across every Table in all our Application Table Databases. The idea is
to have one central repository of information (i.e. Views), whereby developers can go to in order to find what they want or, if it's not there, to
know that it's not been defined in some other obscure area.|| |
| ||My question, is there any performance overhead in accessing Views from a Database, which itself contains potentially thousands of View
The PE's data dictionary cache could overflow, but this will also happen if those views are in different databases.
| ||In addition, is there any overhead in defining the View as (SELECT * FROM A_TABLE) as opposed to naming specific Columns i.e. SELECT
COL1, COL2, etc FROM A_TABLE ?|| |
No, because the * is resolved to all columnsname when the view is created. If you do a "show qualified" you'll see, that both version will
create exactly the same internal source code.
| ||Lastly, when a View is compiled by using the SELECT * type construct, any new Columns subsequently added to the Table are not , I
would assume, picked up in the definition - right ?|| |
| ||Before we press forwards with our architectural document, I wanted to get any feedback of a positive, negative or 'watch out for'
You have to think about a naming convention to include the database name, because the same table name might be used in multiple databases. And
then you might easily hit the maximum name length of 30 characters.