Re: JOIN tables - how to optimise

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I agree with Uri on the design ,
BookingLogSS should be (BookingLogID,RoomID,BookingDate,ClientID)


As for your performance issue , there not much to go on.
First off make sure statistics are up to date, if that doesent improve it
please post DDL.

This is a legacy database, the reason my colleague have this table design
was for performance, (in GUI he has a visual component to lookup the client
name, so no need to do a 7 times 'JOIN' with Client table).

I agree with you this is the way to go:
BookingLogSS should be (BookingLogID,RoomID,BookingDate,ClientID)

We have around 2 million records in the table at the moment, so it will
become 14 millions for this desgin, do you think it will affect the
performance for data retreival?

And in the GUI, my colleague displays the data in the way as a 'Week' in a
row in a datagrid, that's why the original table design came from.

For the new table design, any idea I can display the same way?
eg.
Week Room Mon Tue......Sun
15 Jun 2009 Phoenix John Mary Ken

As Tom suggested pivot, how do I make use of that?


.



Relevant Pages

  • Re: TDD and Refactoring
    ... Given a design with more than one poor qualities, ... > refactor that gives a small but leading benefit. ... Been doing that on the GUI, where it makes a real difference. ... and divert that single client to use the new model. ...
    (comp.object)
  • How Would You Design This Application?
    ... I'm looking for some ideas on which combinations of Java language features, third party tools and design patterns would apply to the design of the following type of system subject to certain constraints as described below. ... The database is relational but the server must work with an object-oriented representation of the data therein. ... User selects an object via the GUI, enters additional data via that same GUI, and issues a synchronous add/update/delete transaction to the server upon clicking the appropriate button. ... Client app must wait for a response from the server before continuing. ...
    (comp.lang.java.programmer)
  • Re: JOIN tables - how to optimise
    ... BookingLogSS should be ... Do you expect the response time to matter whether there are 100 orders in ... In the new design there would only be 20 bytes per row. ... Links for SQL Server Books Online: ...
    (microsoft.public.sqlserver.programming)