I think its called a Hash table.
Basically have a table holding the relative distances between every postcode (but just the postcode 1 ones.
such as BD1 SW1 CF1 CW1) so you get rough distances between areas.
Use an index table to store the blocks for each regions postcodes.
Use the hash table + index to eliminate chunks of the database which are not within a rough distance.
For example if the postcode your looking for is:
SW10 then you can eliminate wales, central/midlands, north, scotland, northern island, and the ickle islands around the UK.
Just scan through the south east postcodes (which you know the location of in the database because you have an INDEX setup).
Look at your CM0239 work mate