Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CLages
Posting Yak Master
116 Posts |
Posted - 2004-07-19 : 10:42:58
|
| this SELECT works fine and get all i want imediatily,but if i change LEFT OUTER JOIN by INNER JOIN , takes too long, around 5 minutes.Does anybodeu knows why?TksCarlos Lages SELECT * FROM titulo WITH (NOLOCK) LEFT OUTER JOIN fornec WITH (NOLOCK) ON titulo.tit_codigo = fornec.for_codigo WHERE (tit_codigo between 724 and 724) and (tit_des between 100 and 100) and (tit_dtpgto IS NULL) and (tit_empresa = 1) ORDER BY tit_codigo , tit_vencto |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-19 : 10:56:03
|
| How many rows are in tituloBecause it's going to scan that table...Did you do a show execution plan?I'm assuming that you've got appropriate indexes...with out the DDL it's hard to say...And I would remove the hint....gonna give you dirty reads...Brett8-) |
 |
|
|
|
|
|