I seem to get best result when starting with the slowest possible attack and fastest possible release, and proceed to slowly shorten the attack, until I start to lose the attack and the sound dulls out a bit. That's where I pull it back a little.
Then I do the opposite with attack, work your way to a slower release which times well with the song.
That's the default setup I use on all my compressors and it works well for me. But for some people, the opposite (as suggested by Wicked) may be a better option. I guess the idea is to spend time trying all kinds of setting and experiment with it. You won't break anything.
On a bass in particular though, I'm still inclined to work with LA-2A models. It just seems to make things a whole lot easier. That being said, there's usually a lot going on on the bass track in my songs - compressor, EQ, Wave's Bass Rider and/or limiter. It's also one of the few places where I sometimes use multi band compression.
All that with a grain of salt - these are things which help me improved but I have yet to mix anything as impressive as my favorite records. ;)