Activity 10
The largest table in any e-commerce system is usually the sales table, and it is almost always the most frequently queried table. As such, you would like to perform some research on the behaviors of the same query under different indexes.
You would like to use two typical queries for research:
- Select all available records within the
salestable that were filtered bycustomer_id = 1 - Select all available records within the
salestable that were filtered bycustomer_id < 100
To check the query plan to see how these queries are executed without an index, with a B-tree index, and with a hash index, you will perform the following tasks:
- Create the statements for the two queries mentioned previously.
- Check the query plan of these two statements without an index.
- Create a B-tree index on the
salestable based on thecustomer_idcolumn. - Check the query plan of these two statements with a B-tree index.
- Drop the...