Hi Guys,
How could I know the indexes of a mysql table has ?
oVer := oServer:Query("SHOW INDEX FROM " + cTable + ";")
//Para una tabla
SELECT DISTINCT
TABLE_NAME,
INDEX_NAME
FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_NAME = 'retalcal';
//Para todas las tablas de una BDD
SELECT DISTINCT
TABLE_NAME,
INDEX_NAME
FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = 'fapsoftware';
vilian wrote:Hi Guys,
How could I know the indexes of a mysql table has ?
aIndexes := oCn:ListIndexes( cTable )
nageswaragunupudi wrote:vilian wrote:Hi Guys,
How could I know the indexes of a mysql table has ?
- Code: Select all Expand view
aIndexes := oCn:ListIndexes( cTable )
Is there any function to create index?
METHOD MakePrimaryKey( cTable, cCol )
nageswaragunupudi wrote:Is there any function to create index?
No.
Not exactly but this function automatically creates a primary key index:
- Code: Select all Expand view
METHOD MakePrimaryKey( cTable, cCol )
Do you mean we don't need index other than a primary key?
oCn:Execute( "CREATE UNIQUE INDEX cust_name_uidx ON cust( name )" )
oCn:Execute( "CREATE INDEX ON employee_sex_idx ON employee( _ )" )
Wouldn't it be better to index the connection variables of detail tables and master table?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 82 guests