Re: JOIN tables - how to optimise
- From: "Man T" <alan_nospam_pltse@xxxxxxxxxxxx>
- Date: Sun, 14 Jun 2009 11:30:08 +1000
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?
.
- Follow-Ups:
- Re: JOIN tables - how to optimise
- From: Erland Sommarskog
- Re: JOIN tables - how to optimise
- References:
- JOIN tables - how to optimise
- From: Alan T
- Re: JOIN tables - how to optimise
- From: Dave Ballantyne
- JOIN tables - how to optimise
- Prev by Date: Re: Performance question
- Next by Date: Re: What do people spend on self-education in the trade?
- Previous by thread: Re: JOIN tables - how to optimise
- Next by thread: Re: JOIN tables - how to optimise
- Index(es):
Relevant Pages
|