Picasso Database Query Optimizer Visualizer

©Indian Institute of Science, Bangalore, India

 

 

SQL Server


(The following setup procedure is known to work with Microsoft SQL Server 2000, 2005, 2008 on Windows.)

 

 

  1. Install MS SQL Server.   Run setup.exe (or Autorun.exe) and follow the wizard for installation of MS SQL Server.  Install with SQLServer authentication.  You will be asked for the password for username “sa”.

  2. Open Enterprise Manager using Start Programs Microsoft SQL Server Enterprise Manager.

 

  1. Create a new database by right-clicking the Databases and selecting New Database in the tree view in the left pane.

  2. Create the tables using the Enterprise Manager.  Under the database you just created, right-click on Tables → New Table.  Here you can enter the table information.

  3. Load the data into the database.  If the data to be loaded is in files, right click on the database and select Tasks Import Data and follow the wizard.  Select the data source as Text File and follow the wizard to completion. 

  4. Create primary key, foreign key and indexes.  In the Enterprise Manager, navigate to the table and right-click on it and select Design.  Here you can add keys, indexes, constraints etc.

  5. Create statistical summaries for all table columns that may be used as Picasso predicates in the query templates, with this command:
             CREATE STATISTICS <stats_name> ON <table_name> (column_list) WITH FULLSCAN
    To improve the scope for optimization, you could optionally create statistics for all columns of each table of the database using  the command:
            
    exec sp_createstats

 

Note: The diagrams on the Picasso website have been generated with statistical summaries created on all table columns.

 

 

Documentation Home