Posted: 06 Jan 2011
To find out which WordPress posts and/or pages are using a specific custom template, e.g., template-file.php, run the following MySQL query:
template-file.php
SELECT * FROM `wp_postmeta` WHERE `meta_value`='template-filename.php';