Click here to Skip to main content
15,913,115 members
Home / Discussions / Database
   

Database

 
GeneralRe: What is the best way to place database on client 's machine? Pin
Ashfield26-Feb-09 1:20
Ashfield26-Feb-09 1:20 
AnswerRe: What is the best way to place database on client 's machine? Pin
N a v a n e e t h25-Feb-09 17:16
N a v a n e e t h25-Feb-09 17:16 
QuestionSome Oracle Question Pin
E_Gold25-Feb-09 9:53
E_Gold25-Feb-09 9:53 
AnswerRe: Some Oracle Question Pin
N a v a n e e t h25-Feb-09 17:20
N a v a n e e t h25-Feb-09 17:20 
QuestionHow to impove my query to execute more quickly Pin
dasha_pl25-Feb-09 3:37
dasha_pl25-Feb-09 3:37 
GeneralRe: How to impove my query to execute more quickly Pin
Luc Pattyn25-Feb-09 3:47
sitebuilderLuc Pattyn25-Feb-09 3:47 
GeneralRe: How to impove my query to execute more quickly Pin
dasha_pl25-Feb-09 4:02
dasha_pl25-Feb-09 4:02 
AnswerRe: How to impove my query to execute more quickly Pin
Wendelius25-Feb-09 4:21
mentorWendelius25-Feb-09 4:21 
dasha_pl wrote:
Would it help me if I create a stored procedure for this


If you can rewrite the SQL (is that permitted?). It seems that you're fetching 20 rows by scanning massive amount of rows.

dasha_pl wrote:
is there any other way


As Luc pointed out, indexing will also help. It would require a bit more info about the tables (amount of rows in each table, how many rows in otis.cs_employee_ have site_code != '00' etc.)

You could try adding indexes like:
- otis.cs_employee_ (site_code, dept_key)
- all primkey columns unless they are already created as primary keys or indexed in another way
- otis.cs_employee_ (lastname)
- otis.cs_employee_ (firstname)

But as a personal opinion, the query is so twisted that if you can, you should rewrite it.

The need to optimize rises from a bad design.My articles[^]

QuestionSelecting a default always and return the other results after to it Pin
gottimukkala25-Feb-09 2:38
gottimukkala25-Feb-09 2:38 
AnswerRe: Selecting a default always and return the other results after to it Pin
Rob Philpott25-Feb-09 2:53
Rob Philpott25-Feb-09 2:53 
AnswerRe: Selecting a default always and return the other results after to it Pin
Wendelius25-Feb-09 4:26
mentorWendelius25-Feb-09 4:26 
AnswerRe: Selecting a default always and return the other results after to it Pin
WoutL25-Feb-09 9:26
WoutL25-Feb-09 9:26 
QuestionBypass Print Dialog When Using Reports through ReportViewer Pin
Seren Singh25-Feb-09 1:53
Seren Singh25-Feb-09 1:53 
AnswerRe: Bypass Print Dialog When Using Reports through ReportViewer Pin
Wendelius25-Feb-09 5:15
mentorWendelius25-Feb-09 5:15 
GeneralRe: Bypass Print Dialog When Using Reports through ReportViewer Pin
Seren Singh25-Feb-09 5:25
Seren Singh25-Feb-09 5:25 
GeneralRe: Bypass Print Dialog When Using Reports through ReportViewer Pin
Wendelius25-Feb-09 6:05
mentorWendelius25-Feb-09 6:05 
GeneralRe: Bypass Print Dialog When Using Reports through ReportViewer Pin
Seren Singh25-Feb-09 19:21
Seren Singh25-Feb-09 19:21 
GeneralRe: Bypass Print Dialog When Using Reports through ReportViewer Pin
Wendelius25-Feb-09 20:38
mentorWendelius25-Feb-09 20:38 
QuestionMDB file? Pin
Karthick_gc25-Feb-09 1:30
Karthick_gc25-Feb-09 1:30 
AnswerRe: MDB file? Pin
J4amieC25-Feb-09 1:58
J4amieC25-Feb-09 1:58 
AnswerRe: MDB file? Pin
Wendelius25-Feb-09 4:34
mentorWendelius25-Feb-09 4:34 
Questionhow to get last row of the database table.or only latest row entered in table Pin
anujbanka178425-Feb-09 1:28
anujbanka178425-Feb-09 1:28 
AnswerRe: how to get last row of the database table.or only latest row entered in table Pin
Diving Flo25-Feb-09 3:36
Diving Flo25-Feb-09 3:36 
GeneralRe: how to get last row of the database table.or only latest row entered in table Pin
anujbanka178425-Feb-09 16:57
anujbanka178425-Feb-09 16:57 
QuestionDTS package Send Mail Pin
Ramkithepower25-Feb-09 0:52
Ramkithepower25-Feb-09 0:52 

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.