Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mtime = explode(' ', microtime());
- $tstart = $mtime[1] + $mtime[0];
- //////////////////////////////////
- try {
- $dbh = new PDO('mysql:host=localhost;dbname=mysql', 'miha', 'qwerty');
- }
- catch(PDOException $e) {
- echo $e->getMessage();
- }
- for ($i = 0; $i < 1000; $i++)
- {
- $sth = $dbh->prepare("SELECT * FROM help_relation WHERE help_keyword_id = :id");
- $sth->bindParam(":id", $u);
- $u = $i;
- $sth->execute();
- echo 'rowCount: '.$sth->rowCount().'<br>';
- }
- //////////////////////////////////
- $mtime = explode(' ', microtime());
- $mtime = $mtime[1] + $mtime[0];
- echo '<br><br>Time: '.round((($mtime - $tstart) * 1000), 4).' мс<br>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment