Wednesday, March 7, 2012

Newbie : Efficiency question - performance

Hi,
querying through SQL, wich gives the best result
having to look in to a large table, or looking in smaller tables but with a
lot of joins...
I'm asking this because right now, i have in my design a couple of tables
with only two or three columns, and about 10 records in each.
Would it be more interesting to add these values in my first table, and
create more records in it..Boonaap wrote:
> Hi,
> querying through SQL, wich gives the best result
> having to look in to a large table, or looking in smaller tables but
> with a lot of joins...
> I'm asking this because right now, i have in my design a couple of
> tables with only two or three columns, and about 10 records in each.
> Would it be more interesting to add these values in my first table,
> and create more records in it..
In general, you should use a relational design and only resort to
denormalization if absolutely necessary for performance. So for now I
would suggest you stick to the relational design you have and tune the
query as needed with properly designed indexes. 10 rows of data is so
small that you probably wouldn't have much of a performance issue.
David Gugick
Imceda Software
www.imceda.com|||>> Would it be more interesting to add these values in my first table, and
The number of columns in a table and the number of tables in a database are
not valid criteria for determining good designs. You may want to start by
analyzing the business model and understand the data requirements first
rather than being concerned about performance of a special query with "lots
of joins".
In general, the number of columns in a table and the number of tables in a
schema by themselves are no way related to performance. However, it may be
worthwhile to keep in mind the limitations of the DBMS, its physical
optimization variables etc which can have an effect on the performance on
some queries.
Anith

No comments:

Post a Comment