It slows down the script - nothing gets sent to the browser until the very end.
In your code, if you've got something in db.php that produces output (including blank lines), or if there are any blank lines at the top of your posted script, take them out, because they will be what's causing the trouble.
The basic reason is that session_start() inserts http headers into the response sent to the browser. It can't do that if you've already started sending the content of the response.
So chrima's comment
If this is enabled, you may send HTTP headers even after HTML output
has been sent.
is wrong: the HTML output is not send until after the headers. Until those have gone out, the HTML has to sit around in PHP twiddling its thumbs - meanwhile everything else that's waiting for it is also sitting around twiddling their thumbs.
Output buffering has its uses, but this is not one of them.