The present invention relates to formula (I) heterocyclyl compounds and its officinal salt and contain their compositions. The invention further relates to the methods for preparing above-mentioned noval chemical compound He its officinal salt with what. Formula (I) compound can treat a variety of diseases related with histamine H 3 receptor, such as cognitive disorder, sleep disturbance, obesity and pain with what.本發明涉及式(I)雜環基化合物和其可藥用鹽以及含有它們的組合物。本發明還涉及用於製備上述新化合物和其可藥用鹽的方法。所述式(I)化合物可用於治療與組胺H3受體有關的多種疾病,例如認知障礙、睡眠障礙、肥胖和疼痛。