restrict vs throw a spanner in the works

restrict

verb
  • To restrain within boundaries; to limit; to confine 

  • To consider (a function) as defined on a subset of its original domain. 

throw a spanner in the works

verb
  • To introduce a problem, dilemma or obstacle, something unexpected or troublesome. 

How often have the words restrict and throw a spanner in the works occurred in a corpus of books? (source: Google Ngram Viewer )