That's a bit of a "how long is a piece of string" question. But as always it depends on the parties involved - if they are really want a quick exchange and there are no finance issues/requirements it can be completed in a few days. But generally the process will be slowed by checks on title, searches, debts etc.
In Spain solicitors play a far smaller role, sometimes not at all involved and often one firm acts for both parties and the process is overseen by a notary. The procedure is far simpler than UK, but IMHO not necessarily a good thing.
Of course the type of property will be an important factor in the speed of the transaction and the registration, or absence of such at the Land Registry. Mine have varied between a week and a month, so in my experience considerably quicker than UK - there's far less paperwork, no Law Society form filling, in fact little at all in writing. But massively more trust required and potential problems in the process.