Assume we are running the following query on a PostgteSQL table table1 with column col1 indexed via b-tree...
SELECT * FROM table1 WHERE col1='foo' ORDER BY col2;
Would the time complexity of the query be equal to...
O(log(n) + m*log(m))
given n is the number of rows in table1 and m is the number of rows satisfying the where clause?