Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: (OT) Don't blow that index dude.

by pileofrogs (Priest)
on Nov 30, 2005 at 20:43 UTC ( [id://513096] : note . print w/replies, xml ) Need Help??


in reply to (OT) Don't blow that index dude.

I'm not much of a DBA. I use MySQL and PG every now and again. Reading the above posts, I had a thought, and I assume I'm wrong, and if you can, I'd love it if someone would explain what's wrong with my thought.

Achem...

My Thought...

What about creating yet another index with the timestamp in the format you need? It seems to me that you'd be trading a bunch of space for exactly the performance you're looking for. It also seems to me that the DBs that allow you to index on a function might just be doing exactly this under the covers.

Thanks!

--Pileofrogs

Replies are listed 'Best First'.
Re^2: (OT) Don't blow that index dude.
by demerphq (Chancellor) on Nov 30, 2005 at 20:52 UTC

    Sure, thats one of the solutions. If you are going to do all your operations in unix time you might as well store it that way in the first place. The point of the thread is just to bring it to the attention of people that weren't aware of this kind of thing. As somebody else said its important to think about how you are going to use the data.

    ---
    $world=~s/war/peace/g