robmorgan/phinx — pull request #323 by svemir (2014-10-04 15:54:56+00:00)
Title: Optimize table existence check

On large databases, running SHOW TABLES will return a large array. Avoid grabbing and looping over that every time by checking the table by name directly. This way we also potentially avoid some disk operations. See here for reference:

http://dev.mysql.com/doc/refman/5.5/en/information-schema-optimization.html

"Within a database, avoid queries that use a nonconstant table name lookup value (or no lookup value) because they require a scan of the database directory to find matching table files."