Is root canal treatment painful?

Is root canal treatment painful?