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 |
|
sponguru_dba
Yak Posting Veteran
93 Posts |
Posted - 2006-07-06 : 04:57:38
|
| hiI have table with 10 columns,that table having 10 lack record,from appication one query running that is picking up the data like thisSELECT <all fields> FROM TABLE1 where NAME<varchar(20)> AND TEXTID<varchar(122)>some time this query giving error like "time out expired error" any how it is very slow how can solve this problemregardssree |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-06 : 05:03:15
|
quote: Originally posted by sponguru_dba hiI have table with 10 columns,that table having 10 lack record,from appication one query running that is picking up the data like thisSELECT <all fields> FROM TABLE1 where NAME<varchar(20)> AND TEXTID<varchar(122)>some time this query giving error like "time out expired error" any how it is very slow how can solve this problemregardssree
Is there any index on the columns in the where clause? Also whether you are using Like to match the column values?and BTW, was it a valid T-SQL at all?Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
sponguru_dba
Yak Posting Veteran
93 Posts |
Posted - 2006-07-06 : 06:02:19
|
| No "index" on where clause no "like" in sql statement |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-06 : 06:22:07
|
quote: Originally posted by sponguru_dba No "index" on where clause no "like" in sql statement
If these are the frequently accessed columns, I will suggest putting Index on them (so that Table Scans can be avoided). Also, can u tell me how many rows are returned by this query? Would u mind posting original query here?Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
|
|
|