SHOW TABLE STATUS FROM db LIKE tbl

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Noruga
Posts: 2
Joined: Thu 07 Feb 2008 07:40

SHOW TABLE STATUS FROM db LIKE tbl

Post by Noruga » Thu 07 Feb 2008 07:49

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

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 07 Feb 2008 10:00

Insert this line before the execution of a command:

Code: Select all

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

Noruga
Posts: 2
Joined: Thu 07 Feb 2008 07:40

Post by Noruga » Thu 07 Feb 2008 10:11

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!!

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 07 Feb 2008 12:08

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.

Post Reply