[SQL] Compute timeTaken correctly

```timeTaken``` should not count the time of print result.