• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Indexing concept for performance ?

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ??
 
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you describe , How can i write a SQL Query which performs dynamic indexing of a database column??
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic