here's a thought...why not create a version of
GAL
which puts the actual BBCode for links into the posts after the "edit" time expires for users to edit their posts? this way there will be no extra queries at all. it's a static link and not actually querying during each post view.