Wrox Programmer Forums
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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
Old September 26th, 2008, 01:36 AM
Authorized User
Join Date: Dec 2006
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating Index


I have a column Country and City. On anyone one of the column i should create a index to improve the performance of the query.
Which column should i choose for optimum perf.

Your suggestion is highly appreciated.

Old September 26th, 2008, 04:10 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

The usual answer to almost all programming questions: "It depends."

It depends ENTIRELY on the usage pattern of that DB. Nobody can answer the question without that information. What queries do you make on that table that have WHERE clauses that depend on those columns? How often are EACH of those queries used? Those aren't the only questions to ask, but they are a start.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Index on View - SQL prince500 SQL Server 2005 5 September 7th, 2011 07:35 AM
Index carumuga SQL Server 2000 1 December 31st, 2007 12:42 PM
Array index rajanikrishna Beginning PHP 1 December 3rd, 2003 02:00 PM
"Index", "line" vdeykin VB.NET 2002/2003 Basics 2 November 29th, 2003 09:08 AM

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