Forum OpenACS Q&A: Response to Question about an index

Collapse
Posted by David Kuczek on
Good to know... I didn't know about the importance of the order of the column names inside the brakets.

But if I had a table with four columns:

column_1 - column_2 - on_what_id - on_which_table

Additionally I had an index of the kind I mentioned above and four rows were inserted in that table.

The first two rows had values in column_1 and column_2 BUT NULL for on_which_table and on_what_id.

The last two had values in all four columns.

I heard that in case of NULLs in indexed columns the index will not be used!? What if there was a '' instead of a NULL in the first two columns?