Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-25 Thread Richard Carde
On 23 Jun 2010, at 04:58, "Maddin, Peter" wrote: > I actually made the requested changed to my SQL command but there was no > discernable difference. > > I really wasn’t expecting any. > If you think it's related to the amount if data, some basics to try; 1. Take a copy of prod & load into

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-22 Thread Maddin, Peter
1:14 AM To: ozDotNet Subject: Re: Embedding SQL index hints into SQL commands for SQL SERVER. Peter, If the DBA has created that index on the bit column and if the normal process of your store-and-forward results in a very few records matching your criteria then the index may actually help your q

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-22 Thread Greg Low (greglow.com)
10 12:10 PM To: ozDotNet Subject: RE: Embedding SQL index hints into SQL commands for SQL SERVER. Peter, It sounds like the original intent of the design is a form of "message queue" or processing queue. As the basis of the select statement is a couple of bit fields, I&

Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-22 Thread noonie
Peter, If the DBA has created that index on the bit column and if the normal process of your store-and-forward results in a very few records matching your criteria then the index may actually help your query times. As to whether thi

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-22 Thread Maddin, Peter
e 2010 1:18 PM To: ozDotNet Subject: RE: Embedding SQL index hints into SQL commands for SQL SERVER. Another recommendation would be to run an 'update statistics' (eg: sp_updatestats) so that the query optimiser is able to make more informed choices when optimising your queries.

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-22 Thread David Ames
in, Peter Sent: Wednesday, 23 June 2010 11:41 AM To: ozDotNet Subject: RE: Embedding SQL index hints into SQL commands for SQL SERVER. Thanks It is not the inserting of records into the database that is a problem. This is in fact lightening fast. The problem is obtaining a record set of dat

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-22 Thread Maddin, Peter
usnea Sent: Tuesday, 22 June 2010 12:03 PM To: ozDotNet Subject: Re: Embedding SQL index hints into SQL commands for SQL SERVER. Peter, As everyone here seems to suggest your hint for the query is not what you are looking for just like everyone else said. 6000 requests a day on a 20Gb databa

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Paul Duran
f Corneliu I. Tusnea Sent: Tuesday, 22 June 2010 2:03 PM To: ozDotNet Subject: Re: Embedding SQL index hints into SQL commands for SQL SERVER. Peter, As everyone here seems to suggest your hint for the query is not what you are looking for just like everyone else said. 6000 requests

Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread silky
On Tue, Jun 22, 2010 at 11:11 AM, Maddin, Peter wrote: > > Now that it has exceeded 25GB in size there are timeouts on some select > statements and the accumulative affect of these is having a detrimental > impact on the system as a whole. FWIW, you should be able to run the sql trace (sql server

Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Corneliu I. Tusnea
ilto:peter.mad...@pathwest.wa.gov.au] > *Sent:* Tuesday, 22 June 2010 11:12 AM > *To:* g...@greglow.com; ozDotNet > > *Subject:* RE: Embedding SQL index hints into SQL commands for SQL SERVER. > > > > Thanks Greg and everyone else. > > > > I designed the database wh

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Greg Low (greglow.com)
the DDL for the two tables and the indexes, we can probably help further. Regards, Greg From: Maddin, Peter [mailto:peter.mad...@pathwest.wa.gov.au] Sent: Tuesday, 22 June 2010 11:12 AM To: g...@greglow.com; ozDotNet Subject: RE: Embedding SQL index hints into SQL commands for SQL SERVER.

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread tonywr
's), may be confidential, > and may be privileged or otherwise protected from disclosure in the > public interest. The use, reproduction, disclosure or distribution of > the contents of this e-mail transmission by any person other than the > named recipient(s) is prohibited. If you are

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Maddin, Peter
g Low (greglow.com) Sent: Tuesday, 22 June 2010 7:29 AM To: 'ozDotNet'; 'Peter Maddin' Subject: RE: Embedding SQL index hints into SQL commands for SQL SERVER. Hi Peter, The only reason to normally need query hints are for bugs in the SQL optimizer (rare) or a handful of ver

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Greg Low (greglow.com)
a hint is likely to just make the performance worse. Regards, Greg -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of ton...@tpg.com.au Sent: Tuesday, 22 June 2010 9:07 AM To: ozDotNet; Peter Maddin Subject: Re: Embedding SQL

Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread tonywr
t-boun...@ozdotnet.com > > [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Maddin, > Peter > > *Sent:* Monday, 21 June 2010 7:57 PM > > *To:* ozdotnet@ozdotnet.com > > *Subject:* Embedding SQL index hints into SQL commands for SQL > SERVER. > > > >

Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Preet Sangha
[ > mailto:ozdotnet-boun...@ozdotnet.com ] *On > Behalf Of *Maddin, Peter > *Sent:* Monday, 21 June 2010 7:57 PM > *To:* ozdotnet@ozdotnet.com > *Subject:* Embedding SQL index hints into SQL commands for SQL SERVER. > > > > I have a DBA that is suggesting that to improve performanc

Re: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Peter Maddin
ft MVP B: http://msmvps.com/blogs/laflour S: http://www.sharepoint-sandbox.com *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Maddin, Peter *Sent:* Monday, 21 June 2010 7:57 PM *To:* ozdotnet@ozdotnet.com *Subject:* Embedding SQL index hints into SQL commands

RE: Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Michael Nemtsev
din, Peter Sent: Monday, 21 June 2010 7:57 PM To: ozdotnet@ozdotnet.com Subject: Embedding SQL index hints into SQL commands for SQL SERVER. I have a DBA that is suggesting that to improve performance I need to embed optimizer hints in the SQL commands that I use against the database so it will use s

Embedding SQL index hints into SQL commands for SQL SERVER.

2010-06-21 Thread Maddin, Peter
I have a DBA that is suggesting that to improve performance I need to embed optimizer hints in the SQL commands that I use against the database so it will use specific indexes. Is this a good idea? I believe performance problems are related to the size of the database as my test database (2 GB