The goal of presented work was to compare the usage of standard basic wave let function like e.g. bio-orthogonal or dbn with the optimized wavelet created to the best match analyzing ECG signals in the context of P-wave and atrial fibrillation detection. A library of clinical expert evaluated typical atrial fibrillation evolutions was created as a database for optimal matched wavelet construction. Whole data set consisting of 40 cases with long term ECG recording s were divided into learning and verifying set for the multilayer perceptron neural network used as a classifier structure. Compared with other wavelet filters, the matched wavelet was able to improve classifier performance for a given ECG signals in terms of the Sensitivity and Specificity measures.