To put that into perspective
The German fixed line portability scheme involves exchanging porting information between carriers (there are companies which act as intermediates for carriers which only have limited interconnections). Those are stored in databases (or plain text files) and converted to special database files which can be looked up in less than a millisecond. So for every outgoing call a carrier will look up which carrier hosts the number and look up what is the best (read cheapest) way to reach that destination.
When someone ports their number away from one carrier, they are obliged to forward the calls to the new carrier for free for a certain time. That's why carriers charge up to 20 Euros per outgoing number.