Reply to Re: To Use Triggers or Not?

Your name:

Reply:


Posted by Erland Sommarskog on 06/21/05 00:47

anjana sisodia via SQLMonster.com (forum@nospam.SQLMonster.com) writes:
> I have an area on our website where users can customize what data fields
> they want to see displayed from a list of about 50 different fields. I
> have a query that has about 50 subqueries to pull all this info and it
> has just got to be extemely slow...sometimes even times out. I need to
> pull alot of data from different tables and the only solution i can
> think of is to create triggers on the different tables that i want to
> pull and store that info in another table and then just run the query of
> that table so that there are not 50 - 60 subqueries. Is this a correct
> solution or does anyone have any other suggestions? Any help in this
> area would be greatly appreciated. P.S.. I've never worked with
> triggers before but did read up on it a bit.

The triggers could indeed be a way to go. But with the scant information
about your database, it is difficult to say for sure. There may be
other options - for instance add indexes if such are missing.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация