Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Driving table in sql

Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need some clarification. Could someone explain what the Driving table is, and what its significance is? I'm trying to optimize my query....what are the things that I should keep in mind when optimizing ?
As far as I know,a Driving table is the table that is accessed first in a select statement. In the following statement:
Is EMPLOYEE the Driving table, or ADDRESS, ie, the first table in WHERE clause or first table in FROM clause ? I'm confused!!!
Can someone point me to a good link where I can find answers to questions related to optimizing sql statements, and which conditions use indexes and which don't (using wildcards with LIKE clause disables indexes ???) and related doubts.
Thanks a lot. I appreciate all the responses.
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The driving table is the "point" table for your database request. If you have a query for an employee record, it would be the employee table, and the address table is driven off of the employee table. So it is the pivotal table in the request. An picking the right one does effect performance.
There are so many things to look at for tuning performance that the write entire books on the subject. And it also depends on the database you have because they each optimize differently. Yes, if you use like '%abc% an entire table scan will be done. If you use functions like substr on a column before comparing it, the indexes can't be used. But you really need to get some books on the subject for the database being used.
He does not suffer fools gladly. But this tiny ad does:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic