Click here to Skip to main content
15,888,610 members
Home / Discussions / Database
   

Database

 
Generalhai Pin
Asha Rams31-Jul-04 22:32
Asha Rams31-Jul-04 22:32 
GeneralBTrieve 6.15 Pin
Mega131-Jul-04 18:05
Mega131-Jul-04 18:05 
GeneralRe: BTrieve 6.15 Pin
Mekong River1-Aug-04 4:07
Mekong River1-Aug-04 4:07 
GeneralSynchronizing tables Pin
winpiglet31-Jul-04 10:43
winpiglet31-Jul-04 10:43 
Questionis there any Win32 function help access SQL server? Pin
fu031-Jul-04 1:47
fu031-Jul-04 1:47 
AnswerRe: is there any Win32 function help access SQL server? Pin
Michael P Butler31-Jul-04 22:14
Michael P Butler31-Jul-04 22:14 
GeneralSP - Efficient "Find" method Pin
UB30-Jul-04 21:58
UB30-Jul-04 21:58 
GeneralRe: SP - Efficient "Find" method Pin
Daniel Turini31-Jul-04 11:05
Daniel Turini31-Jul-04 11:05 
As a general rule, don't use functions or the LIKE operator on your table columns or your query won't use any indexes.
The easiest way of speeding this query is by replacing this (I assume there's a typo and there is no '@' outside the COALESCE):

WHERE  empid LIKE COALESCE(CONVERT(varchar(3), @empid), '%')
AND    batchid LIKE COALESCE(CONVERT(varchar(3), @batchid), '%')


for something like this:
WHERE  empid BETWEEN @firstEmpid AND @lastEmpid 
AND    batchid  BETWEEN @firstBatchid AND @lastBatchid 

And do a bit of math to calculate the first and last ids.
If this filter returns a small result set, then the slowest part (show below) of the query won't need to run against a lot of records and the query will be way faster.

AND    name LIKE ('%' + @name + '%'




Yes, even I am blogging now!
GeneralSQL query to generate random numbers Pin
Imtiaz Murtaza29-Jul-04 23:45
Imtiaz Murtaza29-Jul-04 23:45 
GeneralRe: SQL query to generate random numbers Pin
Steven Campbell30-Jul-04 7:55
Steven Campbell30-Jul-04 7:55 
GeneralRe: SQL query to generate random numbers Pin
Grimolfr30-Jul-04 8:22
Grimolfr30-Jul-04 8:22 
GeneralBeginner - OLE DB - bind IRowSet to grid control Pin
poptcat29-Jul-04 21:46
poptcat29-Jul-04 21:46 
GeneralRelation between tables Pin
RoyRose7829-Jul-04 20:17
RoyRose7829-Jul-04 20:17 
GeneralRelation between tables Pin
Sendilkumar.M30-Jul-04 19:13
Sendilkumar.M30-Jul-04 19:13 
GeneralRe: Relation between tables Pin
RoyRose7830-Jul-04 22:15
RoyRose7830-Jul-04 22:15 
GeneralPlease recommend on connection to Ms Acess Database Pin
DotNet29-Jul-04 15:16
DotNet29-Jul-04 15:16 
GeneralRe: Please recommend on connection to Ms Acess Database Pin
EdbertP29-Jul-04 16:52
EdbertP29-Jul-04 16:52 
GeneralUser access to SQL Server database Pin
Colin Angus Mackay29-Jul-04 6:35
Colin Angus Mackay29-Jul-04 6:35 
GeneralRe: User access to SQL Server database Pin
Grimolfr29-Jul-04 7:56
Grimolfr29-Jul-04 7:56 
GeneralRe: User access to SQL Server database Pin
Colin Angus Mackay29-Jul-04 22:37
Colin Angus Mackay29-Jul-04 22:37 
QuestionODBC API's code examples? Pin
PrashantJ28-Jul-04 21:54
PrashantJ28-Jul-04 21:54 
Generalxml to excel Help! Pin
michanne128-Jul-04 12:07
michanne128-Jul-04 12:07 
GeneralCreate System Database form C# using ADOX Pin
ulrich_v28-Jul-04 0:37
ulrich_v28-Jul-04 0:37 
GeneralNeed help!!! Pin
yanh10027-Jul-04 14:12
yanh10027-Jul-04 14:12 
QuestionCan I call OLEDB and ADO from the same app? Pin
CherezZaboro27-Jul-04 8:34
CherezZaboro27-Jul-04 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.