Seagate ST43401N/ND Información técnica Pagina 77

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 172
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 76
Migrating to Sybase Adaptive Server Enterprise 11.5 5-23
Adaptive Server Enterprise 11.5 If Your Current Version is 4.x, 10.x, or 11.0.x
select ship_to_address
from customer_orders
where last_order_date >= "01/01/1997"
GROUP BY ship_to_address
Use the leading column of an index. If the leading column is
missing from the query, Adaptive Server can’t utilize the index.
In this example, Table A has a non-clustered index on columns
ColA, ColB, and ColC.
Coded this way, the query will not use the index:
select ColA, ColB, ColC, ColD, ColE
from tableA
where ColB = 45
and ColC = "Quality"
select ColA, ColB, ColC
from tableA
where ColC = 45
Coded this way, the query may be able to use the index because
the index may “cover” the query (the index may supply all the
data required):
select ColA, ColC
from tableA
where ColB = 45
Coded this way, the query will use the index to find the specific
data, since each
select clause uses one or more leading columns:
select ColA, ColC, ColD, ColE
from tableA
where ColA = 45
select ColA, ColC
from tableA
where ColA = "C"
and ColB = 99
select ColA, ColC
from tableA
where ColA = "A"
and ColC = "Quality"
select ColA, ColC, ColD
from tableA
where ColA = "A"
and ColB = 401
and ColC = "Quantity"
Vista de pagina 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 171 172

Comentarios a estos manuales

Sin comentarios