Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 28th, 2009, 02:12 AM
Authorized User
 
Join Date: Oct 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default Different execution time of query in two environment

Hi all,

I am using a SELECT COUNT query with several conditions in the WHERE clause. When I execute the query in the Dev environment, it completes in just a minute or less, but when I execute the same query in the Prod environment with same number of records, table structure and index, the query takes more than 1 hour to complete. What could possibly cause the slow execution in the Prod environment? Thank you.
  #2 (permalink)  
Old April 28th, 2009, 02:29 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Despite what you wrote, the first thing to be suspicious of is whether you indeed have all the same fields INDEXED or not. Almost always, something this much slower means the DB is having to do an extensive scan of the actual records instead of being able to work within the indexes.

You don't say what DB your are using. If it's a DB that allows you to view its "execution plan" (example: SQL Server), then do so on both machines and almost surely the differences will pop out at you.
  #3 (permalink)  
Old May 4th, 2009, 03:15 AM
Authorized User
 
Join Date: Oct 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default Different execution time of query in two environment

Thanks for the reply old pedant..

My database is Sybase 15.0, regarding the indexes, I have checked the indexes of all tables used in the query and they are the same in dev and prod.

I have also tried using showplan and the results of the plan in the environment is also exactly the same. I still can't find what's causing the difference in execution time..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Execution time baaul Reporting Services 2 February 3rd, 2015 04:18 PM
Time page execution mat41 Classic ASP Professional 0 August 15th, 2007 01:16 AM
script execution time madhukp Classic ASP Basics 2 February 2nd, 2005 04:51 AM
Run-time code execution module0000 Beginning VB 6 1 June 20th, 2003 04:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.