It performs a full scan of the blockchain so it can indeed take time. We can't give you an exact figure because it depends on your server characteristics, number of blocks, and size of blocks, so you should test it for your particular system and network traffic levels. Given a fairly uniform number of transactions per day, the time taken will scale approximately linearly with the number of blocks in the chain.