Re: Hierarchical Relationship

From: <joe_celko_at_my-deja.com>
Date: 2000/03/19
Message-ID: <8b1jgm$qtj$1_at_nnrp1.deja.com>#1/1


>> we use prefixes for tables (t_), views (v_), functions (f_) and
procedures (p_). in case of performance problems one easily sees what's going on. <<

No, you don't see anything about performance from the prefixes. I owld guess that 80-90% of the time, bad performance is due to a bad query, not to how the data was physically stored.

>> ever wondered how a query like "select a from b" could take ages?
let "a" be a function without arguments... sure, the compiler knows the types and semantics but black-box-thinking and information hiding works only to a limited extend. <<

So much for the whole ideas of Structured Programming, OO programming, and most of computer science for the last 25 years!<g> I do not do host language operations in my database, such as elaborate user defined functions. We designed SQL to be a data retrieval langauge, not a computational language.

When I do get to the point that I know I have a good query, but a poor execution, I look at the execution plan (EXPLAIN , SHOW, whatever that particular product uses for a keyword). Now it is a matter of statistics and indexing, not whether something is a table or a view.

--CELKO-- --CELKO-- Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Mar 19 2000 - 00:00:00 CET

Original text of this message