sql - database - date - multiple columns or one? -


i'm working on database, , can see table set multiple columns (day,month,year) opposed 1 date column. i'm thinking should convert one, wanted check if there's point it.

i'm rewriting site, i'm updating code deals anyway, i'm curious if there advantage having way?

the thing gets used compare data, columns compared, , think integer comparison might faster date comparison.

consolidate them single column - index on single date more compact (and therefore more efficient) compound index on 3 ints. you'll benefit type safety , date-related functions provided dbms.

even if want query on month of year or day of month (which doesn't seem case, judging description), there no need keep them separate - create appropriate computed columns , intex them.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -