i change my chain every 4000kms, you can run em much longer but as others have mentioned you'll have to change the cassette as well, you can get 9000-12000kms out of a record chain but you'll kill the cassette running it that long.. changing the chain more often can increase the cassette life by around 20-30%, given the price difference it makes lots of sense.
Start with a new chain, rings and cassette. Do regular maintenance (clean & lube) and you may extend the your train's service life three fold. 12000km or more is possible with regular, tender loving care.
Proper chain cleaning is paramount and I will describe the procedure here:
First of all, I suggest using a master link to facilitate easy removal and replacement.
No1- Get all the gunk off the chain even if it's newly packed with sticky preservative:
Get a container with a lid just big enough to fit a rolled up chain. Fill the container half way with Simple Green or "equivalent cleaner" (I don't know of one). Fill in the rest of the space with hot water so the chain is totally submerged. Let it sit for a least an hour (depends how dirty or "sticky" it is). During sitting time, giving the container a good shake once in a while will help loosen the gunk.
No2- Pull the chain out, inspect and if it looks good, give a thorough wash under the tap until it glistens and sparkles. Hang it up to dry in the sun or put your toaster on low and place it on the rack. In the meantime, clean your cogs, cassette and rings with the same stuff.
No3- Give the chain a thorough lube with a good silicone based, teflon product (I use Finish Line). Let it soak, wipe off the excess and you're good to roll.