Let's say that I have a table that looks like the following:
CREATE TABLE products (
product_no integer UNIQUE NOT NULL,
name text,
price numeric
);
Then if I insert values into the table, will postgres (or any similar DBMS) actually check through each row of the table or is an index automatically created? If there is no index, this becomes expensive really fast [O(N!)].