I needed a datetime field in my postcards script. I added one. I also added a timestamp to the links table on several sites.
The overhead for adding one small "system" field (meaning it has a defined, fixed format in the MySQL core code) is almost trivial. Adding a couple of keywords (or just words to a title) to a link far outweighs the disk space and indexing requirements of this sort of field.
Also, by using several different fields, you can improve performance, and CPU is *MUCH* *MUCH* more expensive than disk space. It always has been, and always will be. You have one processor (usually) but you can attach an infinite number of disks (theoretically). Even on 4 processor systems, you have 4 CPUs, but you can install 12 RAID boxes with 3 terabytes of information.
If you need to sort links by the RELATIVE time they were added, just use SORT BY Add_Date, ID
The higher the ID, the later the link was added to the system.
This gets trickier with Mod_date, so you'd need to track the specific time a link was modified by using a separate field. Because "hits" get written to the link dynamically, you don't want to use a timestamp field.
Alex's suggestion of using an integer field, which stores the localtime() value is a good one. This can be converted to a date/time as needed, and it can also be sorted qickly to provide a relative relationship without incurring any special processing or conversions until needed.
Basically, you had a need or a desire, and asked a question. You got answers you didn't like like. Fortunately, there is a virtually trivial work around, adding a new field to the links table.
This is not the same as a request for a hook into the Admin system, a new field type "File" or configuration variable for "sort order". There was no quick/easy and portable work around for those. There is for Date/Time sorting -- especially if you add your own field which is managed by your own plugin.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
The overhead for adding one small "system" field (meaning it has a defined, fixed format in the MySQL core code) is almost trivial. Adding a couple of keywords (or just words to a title) to a link far outweighs the disk space and indexing requirements of this sort of field.
Also, by using several different fields, you can improve performance, and CPU is *MUCH* *MUCH* more expensive than disk space. It always has been, and always will be. You have one processor (usually) but you can attach an infinite number of disks (theoretically). Even on 4 processor systems, you have 4 CPUs, but you can install 12 RAID boxes with 3 terabytes of information.
If you need to sort links by the RELATIVE time they were added, just use SORT BY Add_Date, ID
The higher the ID, the later the link was added to the system.
This gets trickier with Mod_date, so you'd need to track the specific time a link was modified by using a separate field. Because "hits" get written to the link dynamically, you don't want to use a timestamp field.
Alex's suggestion of using an integer field, which stores the localtime() value is a good one. This can be converted to a date/time as needed, and it can also be sorted qickly to provide a relative relationship without incurring any special processing or conversions until needed.
Basically, you had a need or a desire, and asked a question. You got answers you didn't like like. Fortunately, there is a virtually trivial work around, adding a new field to the links table.
This is not the same as a request for a hook into the Admin system, a new field type "File" or configuration variable for "sort order". There was no quick/easy and portable work around for those. There is for Date/Time sorting -- especially if you add your own field which is managed by your own plugin.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.