![]() It is still possible to write the query so that the database can use a concatenated index on DATE_COLUMN, TIME_COLUMN with an access predicate-at least partially. When using MySQL, function-based indexes are not an option anyway. ![]() The next option is a function-based index if the database supports it-although this has all the drawbacks discussed before. Unfortunately it is often not possible to change the table when facing this problem. You can then use this column without a function call: SELECT. ![]() You can avoid this problem by using a data type that has both a date and time component (e.g., MySQL DATETIME). I make my living from training, other SQL related services and selling my book.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |