473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Descending Sort on index

I have a unique index based on the following columns:
ProjectID (int)
MaterialCatalogID (int)

Material catalogues are pretty much static but projects are dynamic and
people are most likely to be working on the latest project so would
using a descending sort on the ProjectID in the index gain any
performance?

Jul 23 '05 #1
2 1826
You'll probably have to give some more details of what your data looks
like, what your most frequent queries and data modifications are etc.
But changing the order of the index is probably only really useful when
you have a lot of queries which return results in that particular
order. You could always try it out on a test server, of course.

Simon

Jul 23 '05 #2
An index can be traversed both ascending and descending. This means that
changing the index order (in the index definition) is never useful for
single column indexes.

If you have compound indexes, then the order can influence performance
of some very specific queries. Generally I would not worry about the
index order.

Gert-Jan
Trevor Best wrote:

I have a unique index based on the following columns:
ProjectID (int)
MaterialCatalogID (int)

Material catalogues are pretty much static but projects are dynamic and
people are most likely to be working on the latest project so would
using a descending sort on the ProjectID in the index gain any
performance?

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: renster | last post by:
I have been looking at implementing the following but with a difference. http://forums.devshed.com/t47653/s.html This example uses a link which works with some code shown on the page. I have...
1
by: Seansan | last post by:
Hi there, I am trying to sort an array hash on values. I pass a FORM tag and resolve it to the array position to sort on. (see code below). Is there an easy way to sort ascending or descending...
12
by: Tuhin Kumar | last post by:
Hi, Oracle give the error ORA-01418 when I try to do the following; Create unique index t1_pk on TABLE1(EntryId DESC) ; If the I try to add primary key Contraint using the above index t1_pk...
2
by: Luigi Napolitano | last post by:
Hello, I use this algorithm to sort an array "v" in the descending order. void quickSort(float v, int lo0, int hi0) { int lo = lo0; int hi = hi0; if (lo >= hi) return; float mid = v;
5
by: Bupp Phillips | last post by:
I can't find a way to create descending Indexes in PG. Is this possible? If so, can you point me in the right direction? If not, can I request this to be an enhancement? Thanks
7
by: Luigi Napolitano | last post by:
Hello, I use this algorithm to sort an array "v" in the descending order. void quickSort(float v, int lo0, int hi0) { int lo = lo0; int hi = hi0; if (lo >= hi) return; float mid = v;
3
by: Leszek | last post by:
Hello, I guess it should be easy. I need to iterate through the XML node list using foreach in descending order: string XML_DOCUMENT = Server.MapPath("members.xml"); XmlDocument myXmlDoc =...
11
by: dwelden | last post by:
I have successfully used the sort lambda construct described in http://mail.python.org/pipermail/python-list/2006-April/377443.html. However, how do I take it one step further such that some values...
5
by: John Devlon | last post by:
Hi everyone, With this post I would like to ask you all a small question. I'm trying to sort an array of objects using IComparable. Adding below displayed code to a class and triggering the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.