Okay SQL Gurus, Help me out......
Posted in 1997
Topics: SQL Development & Query Writing
I've got a table (I didn't design it) that stores dates in an integer column. The date is stored as the number of seconds since January 1, 1970. I have prepared an SQL query to select the value and convert it to a datetime: select datetime('01-01-1970 00:00:00', year to second) + integer_column units seconds from table ...... The logic works fine (my syntax might be a little off in this example) but it is SSSLLLLOOOOOOOOOOWWWW. It takes about 10 minutes to select all of the rows. The table currently has 600 rows on a Sun sparc. I am just about the only user on the machine. If I don't do the datetime conversion, the select is instantaneous. Does anyone have any suggestions on how to speed this up? . Alternate SQL syntax? . A completely different approach? Thanx in advance.. -jeff frabutt(jfrabutt@micinc.com) Please respond to my e-mail address since I don't get to browse the newsgroups often.