What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

When browsing questions tagged with , on the right sidebar it displays the related tags (such as , , and ).

Can someone tell me how to query in the SEDE to get the related tags of ?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You could use this comically inefficient query I just created.

It just looks for all of the Posts that have the tag you're searching for, then groups by the other tags on those posts, then displays those other tags in descending order by quantity.

It appears to line up precisely with the sidebar on the tags I tried. Here's :

PHP related tags

Note: User input is case-sensitive on that query, because I'm lazy =)

share|improve this answer
    
thank you very much, as you know to do such a complex query so much will slow down the database server, is it better to cache these related tags ? –  jacky chou Jul 24 '12 at 4:30
3  
@qqas: I think it is a separate server that caches old data (refresh once every few weeks) - so I don't think it is a problem even if the query is slow. –  nhahtdh Jul 24 '12 at 5:12
1  
@qqas nhahtdh is correct, Data Explorer runs on it's own hardware, and it also caches results. So if you run the same query over and over, you won't be doing full requests. Also, I imagine on the main site that the related tags are, in fact, cached. –  jadarnel27 Jul 24 '12 at 12:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .