Home All Groups Group Topic Archive Search About
Author
14 Jul 2006 3:31 PM
HP
Below is my view which returns 70,000 + records. It takes like a minute or
more sometimes. How can I make it faster. With time the number of rows are
going to increase and the query will take even longer. Please help how I can
optimise query to make it run faster.

Help is apreciated. Any ideas with help.3

select s.story_id,
u.title as title,
s.title as story_name,
[rundown_date]=convert(char(10),u.air_date,101),
SUBSTRING(s.text, 1, 500) AS script,
SUBSTRING(i.text, 1, 500) as item_text ,
i.type,
i.content_status,
k.keyword,
i.editorial_description as description ,
d.description as notes,
s.editor as creator,
i.original_material_id as clipname,
i.ar_material_id as material_id
from
na_rundown_tbl u inner join na_story_tbl s on s.rundown_id=u.rundown_id
left outer join na_item_tbl i on s.story_id=i.story_id
left outer join na_itemkeyword_tbl k on i.item_id=k.item_id
left outer join na_itemdesc_tbl d on i.item_id=d.item_id

Author
14 Jul 2006 5:36 PM
lord.zoltar
HP wrote:
> Below is my view which returns 70,000 + records. It takes like a minute or
> more sometimes. How can I make it faster. With time the number of rows are
> going to increase and the query will take even longer. Please help how I can
> optimise query to make it run faster.
>
> Help is apreciated. Any ideas with help.3
>
>

You're using SQL Server? It has a built-in index tuning wizard. Have
you tried it out?
Author
14 Jul 2006 6:39 PM
HP
No i have never used it. How and where can I find more info on it.

Thanks

Show quote
"lord.zol***@gmail.com" wrote:

>
> HP wrote:
> > Below is my view which returns 70,000 + records. It takes like a minute or
> > more sometimes. How can I make it faster. With time the number of rows are
> > going to increase and the query will take even longer. Please help how I can
> > optimise query to make it run faster.
> >
> > Help is apreciated. Any ideas with help.3
> >
> >
>
> You're using SQL Server? It has a built-in index tuning wizard. Have
> you tried it out?
>
>
Author
14 Jul 2006 5:40 PM
Tracy McKibben
HP wrote:
Show quote
> Below is my view which returns 70,000 + records. It takes like a minute or
> more sometimes. How can I make it faster. With time the number of rows are
> going to increase and the query will take even longer. Please help how I can
> optimise query to make it run faster.
>
> Help is apreciated. Any ideas with help.3
>
> select s.story_id,
> u.title as title,
> s.title as story_name,
> [rundown_date]=convert(char(10),u.air_date,101),
> SUBSTRING(s.text, 1, 500) AS script,
> SUBSTRING(i.text, 1, 500) as item_text ,
> i.type,
> i.content_status,
> k.keyword,
> i.editorial_description as description ,
> d.description as notes,
> s.editor as creator,
> i.original_material_id as clipname,
> i.ar_material_id as material_id
> from
> na_rundown_tbl u inner join na_story_tbl s on s.rundown_id=u.rundown_id
> left outer join na_item_tbl i on s.story_id=i.story_id
> left outer join na_itemkeyword_tbl k on i.item_id=k.item_id
> left outer join na_itemdesc_tbl d on i.item_id=d.item_id
>
>
>
>

Start with the basic tuning steps.  Have you reviewed the execution plan
to identify bottlenecks?


--
Tracy McKibben
MCDBA
http://www.realsqlguy.com

AddThis Social Bookmark Button