Page 1 of 1

SHOW TABLE STATUS FROM db LIKE tbl

Posted: Thu 07 Feb 2008 07:49
by Noruga
Hello

I am using the newest version of the MyDirect driver for MySQL 5.0 and have the following problem.

From the logs created by MySQL I see that the statement
"SHOW TABLE STATUS FROM db LIKE tbl"
is run each time a select is performed on a InnoDB-table that has a autoincrement field. When the tables become huge (1 mill ++) I see a huge perfromance issue when this statement is run.. And since it runs each time a select is performed on tables with autoincrement the dbserver crashes in the end.

Does anyone know if it is possible to turn off this statement? Or any workaround this problem... Anyone had simular problems?

Thanks

Posted: Thu 07 Feb 2008 10:00
by Alexey.mdr
Insert this line before the execution of a command:

Code: Select all

MySqlDataAdapter.RetrieveAutoIncrementSeed = false;
This should solve the problem.

Posted: Thu 07 Feb 2008 10:11
by Noruga
Hello
Thanks alot for the fast response.
Now it works :D

Could you also please tell me why this is set to true as default?
What purpose does this statment have?
Why does it only occur on tables that uses autoincrement ?
Will I loose functionality due to setting this property to false?

Thanks for your help!!

Posted: Thu 07 Feb 2008 12:08
by Alexey.mdr
It is needed to set correctly DataColumn.AutoIncrementSeed property.
This property is available, though it is hidden by
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] attributes.
Just set it as described above and recompile your project.