Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.1 KB

README.md

File metadata and controls

24 lines (17 loc) · 1.1 KB

SQL Select Extraction and Analysis

This repository provides tools for straightforward extraction of the SQL Select statements from the Posts.xml file and their subsequent analysis. Posts.xml is a StackOverflow file that contains all the questions and answers in XML format.

Usage

Pass a path to the Posts.xml file to the postsxml_sql_extract.py program. The program will generate sqlcommands.txt file with SQL Select on each line.

python postsxml_sql_extract.py <path_to_posts.xml_file> 

The creation of sqlcommands.txt is a mandatory step for any subsequent SQL Select analysis. Once sqlcommands.txt is created you may collect different statistics.

Percent of Window Function per Thousand Queries

This analysis compute two statistics:

  1. The number of window function per each chunk of thousand queries.
  2. The number of window function types.
python sql_WF_analysis.py sqlcommands.txt

The number of window function per thousand queries

Window function types