After seeing your post that the car is on a dealer's lot it is a no brainer for them to pull a carfax for you. I haven't seen a dealer that doesn't subscribe to carfax. Now, FWIW- Carfax does not guarantee there isn't something major wrong with the car. If an independent garage has done service on it the only way it will show up is if they enter the VIN # and update the car's history. Not likely to happen. If it has been submerged in a flood, rebuilt from an accident or anything where an insurance claim has been paid it will? show up. If it has been serviced at a dealer it may show up.
How do I know this? I bought a lemon because I believed the Carfax report. The best way to minimize your chances of buying one is to have a qualified technician go over the car. Check compression, pull wheels to check the brakes, look for damage underneath and signs of leaks. Pressurize the coolant system and make sure it doesn't leak. Check the coolant for signs of oil and conversely check the oil for coolant. Look for body panel replacements. Make sure it isn't bent so bad it dog tracks down the street. Yeah, it costs more than a carfax; maybe three to six times as much. But, as another poster has said, it may save you from a major headache.