Mysql Slow "SHOW TABLE STATUS FROM"

I'm checking the slow query log, and I found this:

I have a Mysql Server 5.5 and In VB.NET when launch a query like "SELECT * from exampletablename1 " always in the mysql slow log i found this slow query "SHOW TABLE STATUS FROM database like 'exampletablename1'

I don't understand why a "select *" generate the "show table status from..., but in any case, I'm sure that the "SHOW TABLES STATUS" are a slow query

Why? and how can I solve it

Regards



lnriveraAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
can you please check which value this property has on the data adapter (MissingSchemaAction):
http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.missingschemaaction.aspx

it shall be "Add" by default, you might consider to change to ignore, and create the data table configuration explicitly before filling it from the data adapter
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the vb.net code is likely having the abstraction layer that is first looking at the table meta data information before actually running the query ...
0
 
lnriveraAuthor Commented:
I'm agree, but the problem is that SHOW TABLE STATUS FROM tablename when I use a innodb table take more than 1 minute to return the results...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you probably have plenty of tables in your database, right?
anyhow, can  you please show the relevant .net code?
0
 
lnriveraAuthor Commented:
In the beginning I supose that the "select *" generated the problem, but I did a deep analyse, and I found that the show table status are generated always that I include in the select sentence the primary key field. If I launch a select query that doesn't have the primary key field included, the mysql adaptar doesn't generate the show table status before
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.