| Author |
Using Indexing concept for performance ?
|
RaviNada Kiran
Ranch Hand
Joined: Jan 30, 2009
Posts: 528
|
|
Hi Ranchers ,
Is Indexing on a Database column is performed dynamically depending on the search parameters selected by the user? Or at the time of table creation ??
|
If you want something you never had do something which you had never done
|
 |
steve souza
Ranch Hand
Joined: Jun 26, 2002
Posts: 852
|
|
|
I can't speak for all databases, but in Sybase the query optimizer looks at the arguments passed to a query and determines the best available index or none at all based on which one it thinks will perform best at the time of the query.
|
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
|
 |
RaviNada Kiran
Ranch Hand
Joined: Jan 30, 2009
Posts: 528
|
|
|
can you describe , How can i write a SQL Query which performs dynamic indexing of a database column??
|
 |
Anurag Blore
Ranch Hand
Joined: Jan 15, 2003
Posts: 74
|
|
Ravi,
I am not sure if youcan write a SQL which will create indexing on a table. You shuold create index on a table based on your requirement. Creating indexing on all the columns could have performance impact.
You can refer here for basic indexing conepts
sql indexing
|
Thanks,
Anurag
SCJP 1.2 & 1.5, PMP
|
 |
RaviNada Kiran
Ranch Hand
Joined: Jan 30, 2009
Posts: 528
|
|
Anurag Blore wrote:Ravi,
I am not sure if youcan write a SQL which will create indexing on a table. You shuold create index on a table based on your requirement. Creating indexing on all the columns could have performance impact.
You can refer here for basic indexing conepts
sql indexing
Thanks a lot.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
Indexing isn't actually defined by the SQL standard, which is based on abstract data access without regard to the limitations of the real world. Some DBMS's may index on their own initiative, but most commonly it's explicitly done via DDL.
Indexing can greatly speed performance, but it can also do the reverse. A classic example is to do a bulk load for an indexed table. Because the index trees are usually being rebalanced with each record loaded, this can make a load take an excruciatingly long long time. Instead, the common procedure is to load an unindexed table, then index it. That's actually a practice that predates DBMS's as we know them.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
RaviNada Kiran
Ranch Hand
Joined: Jan 30, 2009
Posts: 528
|
|
Tim Holloway wrote:
Indexing can greatly speed performance, but it can also do the reverse. A classic example is to do a bulk load for an indexed table. Because the index trees are usually being rebalanced with each record loaded, this can make a load take an excruciatingly long long time.
Great point . Thank you very much
|
 |
 |
|
|
subject: Using Indexing concept for performance ?
|
|
|