indexing expressions in sql


indexing expressions in sql



I have a database where one of the common queries is has a "where blobCol is null", I think that this is getting bad performance (as in a full table scan). I have no need to index the contents of the blobCol.

What indexes would improve this? Can an index be built on an expression (blobCol is not null) rather than just a column?




Multiple FKs with ON DELETE CASCADE to the same table (MSSQL2008)

1:



Sanity Check: Floats as primary keys?
Yes, most DBMSs support it, for instance in PostgreSQL it is.
Sqlite binding within string literal
CREATE INDEX notNullblob ON myTable (blobCol is not NULL); 
It seems that the best you could do on SQL Server though is to create a computed column that, for example, will contain 1 if blob is null and 0 otherwise and create an index over that..
what characters should be escaped in sql string parameters


combobox and text input


Dynamic SQL to load images from a directory

2:



converting from string to date in VBA and clearing old SQL data output for automation program
Some databases allow indexes on expressions but a plain index should reduce the running time of your query significantly..
What to use in SQL instead of a “Foreach” loop



84 out of 100 based on 74 user ratings 1074 reviews