Bitrix\Main\Loader::includeModule("iblock");
$connection = Bitrix\Main\Application::getConnection();
$tracker = $connection->startTracker();
$query = Bitrix\Iblock\ElementTable::getList(array(
'select' => array('ID', 'NAME'),
'filter' => array('IBLOCK_ID' => 2),
));
$connection->stopTracker();
foreach ($tracker->getQueries() as $query) {
var_dump($query->getSql());
var_dump($query->getTime());
}