Skip to content

Straightforward extraction of the SQL Select statements from the Post.xml file.

License

Notifications You must be signed in to change notification settings

RadimBaca/SO_sqlselect_extraction

Repository files navigation

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

About

Straightforward extraction of the SQL Select statements from the Post.xml file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages