# Preparations
# clear contents of `SlowSqlCapture` and `StatisticsCapture` tables in the database* in IDE:
 # enable debug mode
* in Web Browser
 # open Front-End
 # remember SQL count in Debugger (in my case it was 21 sql (1 of SQLs was repeated twice + 1 sql was non-loggable because it wasn't a SELECT = 19 loggable sqls)
* in IDE:
 1. disable debug mode
 2. open `/system/debug.php` file for editing
 3. uncomment `DBG_CAPTURE_STATISTICS` and `DBG_MAX_SQL_TIME` constant declarations
# disable debug mode
# Plan (part 1 - general logging)
* in IDE (will emulate state, 4. set `0` (instead of current value of `2`) as value for `DBG_MAX_SQL_TIME` constant
 5. when every SQL is a slow one and needs to be recorded):save changes
 #6. open `/system/debugindex.php` file for editing
 # uncomment `DBG_CAPTURE_STATISTICS` and `DBG_MAX_SQL_TIME` constant declarations7. after `$application->Init();` line add this code:
```
lang=php
$rows = $application->Conn->GetIterator('SELECT * FROM ' . TABLE_PREFIX . 'Languages', null, true);
echo '[is_iterator:' . (is_object($rows) ? 'yes' : 'no') . ']';
``` 
 # set `0` (instead of current value of `2`) as value for `DBG_MAX_SQL_TIME` constant8. save changes
# Plan (part 1 - general & iterator logging)
* in Database Manager:
 # save changes# clear contents of `SlowSqlCapture` and `StatisticsCapture` tables in the database
* in Web Browser
 # go to Front-End
 # confirm, that no Fatal Error happened
 # confirm, that `[is_iterator:yes]` text is displayed somewhere on the page (before the patch it would have `no` instead of `yes`
* in Database browser
 # open `SlowSqlCapture` table
 # confirm, that record for each unique SQL (was 19 records in my case + one of records has Hits=2) are created
 # confirm, that records mentioning `SlowSqlCapture` and `StatisticsCapture` tables are not logged
# Plan (part 2 - iteratoload balancer logging)
...
* in Database Manager:
 # clear contents of `SlowSqlCapture` and `StatisticsCapture` tables in the database
* in IDE:
 1. open `/system/config.php` file for editing
 2. add this code fragment at the end (adjust DB username/password to match the ones you're using):
```
lang=php
$_CONFIG['Databases'] = array(
	array(
		'DBHost' => 'localhost',
		'DBUser' => 'alex',
		'DBUserPassword' => 'alex',
		'DBLoad' => 1,
	),
);
``` 
 3. save changes
* repeat tests from `Plan (part 1 - general & iterator logging)`