This paper mainly studies the design of an efficient social network log analysis program based on the distribut- ed database, MongoDB. The so-called social network log analysis is to gather and store the log information generated when users access the social network pages, and then transform, clean and excavate. This article compares MongoDB da- tabase with traditional relational database, analyzes its advantages and application scenarios. Its anti-paradigm design due to the nest avoids the association, making queries and storage of the large data efficiently by: storing social network logs in the MongoDB; directly analyzing the logs with its built-in MapReduce programming model, and saving the results of the analysis as files for business people to use. Our study aims to discover the hidden users' access rules and patterns in the log data by effective data mining of the social network log data, thereby providing helpful information for optimizing website structure and business model. With the growth and expansion of the Internet enterprise scale, social network log information also grew step by step. In order to provide better services, it is necessary to under- stand the features and needs of the user's access, by analyz- ing and studying the user's behavior, so analysis of the Social network logs was suggested. It combined the traditional data mining and social network logs, by getting the useful infor- mation from a large number of social network logs data, counting and analyzing the users' behavior and page view, to finally infer the user's access modes. (1) It can play a role in many situations, such as network security, build the social network site and perform the market analysis of the e- commerce. It is a new research direction for data mining. NoSQL is the general name of the non-relational data- bases, which is a new data storage technology to meet the needs of the rapid growth of the Internet applications. Since it is easy to extend, has high write and read performance even for the large amount of data, and has flexible data mod- els, it have been well developed in some application scenari- os. MongoDB is a representative of NoSQL databases, the document-oriented data model it used, can automatically split the data and store them on different machines. This au- tomatic slicing mechanism achieves a distributed extension, the collections and documents in the database can be stored in many database nodes. The applications of MongoDB are very wide because of its good horizontal scalability: it is suitable for storing low-value and large-sized files; offers a data management technology which satisfies the high con- currency and the magnanimous data processing from the Internet development to cloud computing. Internet provides