Hi,
I have a table with a column date time (it has day, month, year, hours and seconds).
I have two questions:
1: I would like to make a query of entries looking for dates, but I am only interested to compare the DAY, MONTH and YEAR only (ignore the seconds, hour and minute)
Lets say that I have in the same table a integer column (called "hours").
2: What would be faster (for the computer)?: To get only one table and pool the table to see what rows has the column "hours" bigger than 5hrs and other rows with hrs bigger than 12hrs?
or
it would be faster to perform two separated queries, getting the count of rows bigger thant 5hrs (one query) and other query to get bigger than 12hrs (second query)
Thanks,
I have a table with a column date time (it has day, month, year, hours and seconds).
I have two questions:
1: I would like to make a query of entries looking for dates, but I am only interested to compare the DAY, MONTH and YEAR only (ignore the seconds, hour and minute)
Lets say that I have in the same table a integer column (called "hours").
2: What would be faster (for the computer)?: To get only one table and pool the table to see what rows has the column "hours" bigger than 5hrs and other rows with hrs bigger than 12hrs?
or
it would be faster to perform two separated queries, getting the count of rows bigger thant 5hrs (one query) and other query to get bigger than 12hrs (second query)
Thanks,