PatternService now uses stored procedures.