Storing and retriving query plans to and from registry