Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language 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 February 23rd, 2006, 10:10 AM
Authorized User
Join Date: Jan 2006
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default query tuning

   I had two tables A & B having one common key.I created some indexes.Even thou performance not improved.I created views also,even after that performance not all improved.The query is as below.

SELECT a.customer_id , a.customer_code custCode
FROM A a ,B b
AND a.Country_code = 'US'
AND UPPER(b.first_name) LIKE (:QueryStrFN)
AND (a.is_master = 'Y' OR a.is_master IS NULL)
AND b.customer_id = a.customer_id
ORDER BY custCode

Give me any suggestions/tips for the above query tuning.

  #2 (permalink)  
Old April 5th, 2006, 12:12 AM
Authorized User
Join Date: Mar 2006
Location: , , India.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts

Query tuining, itself is a large issue

Here are some tips
1) Find out using explain plan, whether index(s) is/are used by query or not.
2) If not give hint to optimiser
3) In "where" clause write joining conditions first, folowed by other.
4)If possible write query based on table, instead of view.

Then check explain plan

Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance Tuning vikaspatyal ASP.NET 2.0 Professional 3 October 23rd, 2007 07:32 AM
performance tuning of asp.net web application swati_joshi ASP.NET 1.0 and 1.1 Basics 3 July 24th, 2006 09:42 AM
performance tuning of asp.net web application swati_joshi ASP.NET 1.0 and 1.1 Professional 1 July 14th, 2006 08:46 PM
query tuning using DBMS_STATS ramanadyv SQL Language 0 February 28th, 2006 05:00 AM
Performance Tuning rekha_jsr Excel VBA 0 August 31st, 2005 05:33 AM

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