tag:blogger.com,1999:blog-17253725110914199342024-03-13T08:30:52.832-07:00ReelTymTechnical things that interest me, projects I'm working on, tools/articles I've found helpful, etc.ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.comBlogger221125tag:blogger.com,1999:blog-1725372511091419934.post-72495400688838444292014-04-23T16:06:00.000-07:002014-04-23T16:09:05.819-07:00Find User/Role Permission on an Object<div style="background-color: white; color: black;">
declare<br />
@SchemaName sysname = 'COMPANY_STRUCTURE',<br />
@TableName sysname = 'SUPP_SUPPLIER',<br />
@UserOrRole sysname = 'ECT_Role'<br />
<br />
declare @perms table<br />
(<br />
table_qualifier sysname,<br />
table_owner sysname,<br />
table_name sysname,<br />
grantor sysname,<br />
grantee sysname,<br />
privilege sysname,<br />
is_grantable sysname<br />
)<br />
insert into @perms<br />
exec sp_table_privileges <br />
@table_owner = @SchemaName,<br />
@table_name = @TableName<br />
select *<br />
from @perms<br />
where grantee = @UserOrRole<br />
order by grantee</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-32939081888992879412014-04-02T13:16:00.001-07:002014-04-02T13:16:09.962-07:00How to Make a Healthier Salad<div class="pane-content" data-twttr-id="twttr-sandbox-0">
</div>
<div class="panels-flexible-column panels-flexible-column-2_col_article-1 panels-flexible-column-last panel-col-last">
<div class="inside panels-flexible-column-inside panels-flexible-column-2_col_article-1-inside panels-flexible-column-inside-last">
<div class="panels-flexible-region panels-flexible-region-2_col_article-top__ panels-flexible-region-first panels-flexible-region-last ">
<div class="inside panels-flexible-region-inside panels-flexible-region-2_col_article-top__-inside panels-flexible-region-inside-first panels-flexible-region-inside-last">
<div class="pinterest-image">
<img alt="How to Make a Healthier Salad" class="media-element file-default" height="6696" src="http://greatist.com/sites/default/files/styles/article_main/public/How%20to%20Make%20a%20Healthier%20Salad.png?itok=qBMkhZI5" title="" width="604" /></div>
<br />
<div class="panel-pane pane-block pane-greatist-sailthru-sailthru-signup-modal">
<div class="pane-content">
</div>
</div>
<div class="panel-pane pane-block pane-dfp-d259f8d0c5544e2829c1397eba4f13a6 sidebar-ad">
<div class="pane-content">
<div class="dfp-tag-wrapper" id="dfp-ad-refinery29_sidebar_bottom_300x250-wrapper">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-21911223148404741822013-11-28T10:15:00.002-08:002013-11-28T10:15:11.346-08:00The Ultimate Turkey: Smoked On The Barbecue Or The Grill. Or Not. Gobble 'til You Wobble!<table border="0" cellpadding="5" cellspacing="0" style="width: 789px;"><tbody>
<tr><td width="279"><a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1"></a><div style="position: relative; width: 279px;">
<a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1"><img alt="turkey ready to start" border="0" height="350" src="http://www.amazingribs.com/images/recipes/turkey/turkey_before.jpg" width="279" /></a><div style="bottom: 2px; position: absolute;">
<a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1"></a><a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey/turkey_before.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</td>
<td width="490"><a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1"></a><div style="position: relative; width: 462px;">
<a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1"><img alt="smoked turkey" height="350" src="http://www.amazingribs.com/images/recipes/finished_Smoked_turkey.jpg" width="462" /></a><div style="bottom: 2px; position: absolute;">
<a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1"></a><a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/finished_Smoked_turkey.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</td>
</tr>
<tr>
<td class="bodytext" colspan="2"><strong>Before and after. Those are sage leaves on the platter and under the skin. Click here to <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1">see enlargements</a>.</strong>
</td></tr>
</tbody></table>
<div class="bodytext">
<strong><em>"Let not your learning exceed your deeds lest you become like a tree with many branches and no roots." </em></strong><em>Old Yiddish Saying</em></div>
<div class="bodytext">
<strong><em>By <a href="http://www.amazingribs.com/meathead/meet_meathead.html" sl-processed="1">Meathead Goldwyn</a></em></strong><a href="http://www.amazingribs.com/recipes/meathead/meet_meathead.html" sl-processed="1"></a></div>
<div class="bodytext">
<span style="color: #ed7501;"><strong>Summary.</strong> <span class="summary">Smoked
turkey tastes spectacular, but there are tricks revealed in this recipe
that make it the Ultimate Turkey, whether it is smoked outdoors or
roasted in your kitchen.</span> <strong>Recipe Type.</strong> <span class="recipeType">Entree</span>. <strong>Tags.</strong> <span class="tag">Turkey</span>, <span class="tag">smoked turkey</span>, <span class="tag">BBQ</span>, <span class="tag">barbecue</span>, <span class="tag">barbeque</span>, <span class="tag">grilling</span>, <span class="tag">smoking</span>, <span class="tag">cookout</span>, <span class="tag">party</span>, <span class="tag">dinner</span>, <span class="tag">smoker</span>, <span class="tag">grill</span>.</span></div>
<div class="bodytext">
This is no ordinary turkey preparation,
pilgrims. Digest these logical concepts and you will never again have a
dry, stringy, cardboardy, boring bird.</div>
<div class="bodytext">
</div>
<div class="fltrght" style="position: relative; width: 225px;">
<img alt="fried turkey" border="1" class="fltrght" height="168" hspace="10" src="http://www.amazingribs.com/images/recipes/fried_turkey.jpg" vspace="10" width="225" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/fried_turkey.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
After
tasting this bird you will never again risk life or limb, nor stain the
driveway with grease by deep frying a turkey. This will be the best
turkey you've ever tasted. I know because hundreds of readers have
written to tell me so (see the comments and pictures at the bottom of
the page).<br />
<br />
<div class="bodytext">
The good news is that you don't need a
smoker, although having one helps. You can become a Turkey Zen Master on
any old backyard grill, or even in your indoor oven with these
techniques. But remember, when you cook the bird outdoors, you not only
get great flavor, you free up the indoor oven for sweet potatoes,
stuffing, green beans, and pie.</div>
<div class="bodytext">
Here's a great idea: Rather than
waiting for Thanksgiving, when you have a houseful of critics, why not
have a turkey shoot a few weeks in advance to get your technique down?</div>
<h2>
Manifesto</h2>
<div class="bodytext">
Turkey poses several problems that we
can solve by thinking scientifically. My methods differ drastically from
tradition, but if you follow my guidelines you can make this flightless
bird soar above the flock. Here is an overview from 30,000 feet. I will
discuss each concept in detail, below.</div>
<ol>
<li class="bodytext">We will not stuff the bird. When you
stuff the bird it takes far longer for the heat to travel to the center
of the stuffing and in the process the exterior gets way too hot and the
meat gets overcooked. By leaving the cavity empty the heat and smoke
flavors can enter the cavity, cooking the bird much faster and more
evenly without overcooking.</li>
<li class="bodytext">We will treat the crowd to "muffings"
by cooking the stuffing in muffin pans and serve everyone an individual
muffin shaped stuffing serving, crunchy all over.</li>
<li class="bodytext">We will place a few aromatics in the
cavity. Not enough to prevent airflow, but they will create penetrating
vapors that will flavor the meat more than the stuffing could.</li>
<li class="bodytext">If your turkey is not labeled
"basted", "self-basted", "enhanced", or "kosher" we will help the
proteins hold onto liquid with a dry brine.</li>
<li class="bodytext">Even if it has been injected with a
saline solution at the factory, and chances are that it was, we can
still amp up boring birds by injecting them with butter.</li>
<li class="bodytext">Because herbs and spices cannot get very far past the skin, we will use a wet rub of oil and aromatic herbs <em>under</em> the skin to baste and add more flavor to the meat.</li>
<li class="bodytext">We will add oil and herbs to the outside of the skin to help make it crispy and add flavor.</li>
<li class="bodytext">We will not place the bird <em>inside</em> a roasting pan. Instead we will place it <em>above</em> a roasting pan so air can flow all around it, cooking and browning it properly on the underside.</li>
<li class="bodytext">We will not truss or tie the bird. We
will let the entire surface brown, even the armpits and crotch, because
nobody wants to eat rubbery skin. This will help the thighs and
drumsticks cook faster because they need to be cooked to a higher temp
than the breasts.</li>
<li class="bodytext">We will roast the bird in a humid, aromatic, smoky atmosphere to hold in moisture and add flavor.</li>
<li class="bodytext">We will prevent the wing and drumstick ends from burning by covering them with foil for part of the time.</li>
<li class="bodytext">We will not cook breast side down as has become popular. It just doesn't help, and in fact it harms.</li>
<li class="bodytext">We will not baste during cooking. It
just makes the skin soft. By oiling the skin at the start and by cooking
at the right temp, we will still get a beautiful crisp brown skin.</li>
<li class="bodytext">We will use a digital thermometer to
monitor the bird's temperature to make sure it is not overcooked, and
not the plastic popup that is set 20°F too high, guaranteeing breast
meat drier than week-old stuffing. Click here for a <a href="http://www.amazingribs.com/cooking_weights_measurements_conversions/index.html" sl-processed="1">conversion table from F to C</a>.</li>
<li class="bodytext">We will remove our turkey from the
heat at 160°F instead of 170°F to 180°F as most recipes recommend, and
it still will be safe. Juicier too. The USDA revised its guidelines in
2006 so most cookbooks are out of date.</li>
<li class="bodytext">We will not tent it with foil when it
is finished cooking because the steam trapped under the foil softens
the skin. There is plenty of heat in that thermal mass to keep it warm
while it rests.</li>
<li class="bodytext">We will slice the breasts <em>across</em> the grain rather than <em>with</em>
the grain to make it even more tender. This means we will not slice the
breasts while they are still on the bird, we will remove them before
slicing.</li>
<li class="bodytext">Instead of a gloppy starchy sauce, we will make a succulent <em>thin gravy</em>
the way we would make a soup stock, with giblets and trimmings from the
bird, onions, carrots, celery, and more. We will put them in a pan
under the bird to catch its sexy smoky drippings. We will leave the
gravy thin and potent so it can infiltrate between the muscle fibers
rather than sit on top like a lump. Hot thin gravy will also warm the
meat if it has cooled off too much. We will make enough gravy so we can
still use it to make that thick flour-based goo if the traditionalists
insist, and it will be better than ever because the base is so much
tastier than just plain drippings. And there will still be enough gravy
for leftovers.</li>
</ol>
<div class="bodytext">
</div>
<div style="position: relative; width: 341px;">
<img alt="carved turkey" border="1" height="224" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-14.jpg" width="341" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey/turkey_carving_-14.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
The result will be a <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1">magnificent looking</a>,
dark mahogany avian, with incredibly tender and juicy flesh, delicately
and elegantly flavored with savory herbs and seductive smoke, annointed
with a gravy that eclipses all others. Here's a short video from reader
Jason King of <a href="https://www.youtube.com/user/BBQFOOD4U?feature=watch" sl-processed="1" target="_blank">BBQFOOD4U</a> that summarizes the process.</div>
<iframe allowfullscreen="" frameborder="0" height="191" src="http://www.youtube.com/embed/E7OVm_cv4yY?rel=0" width="340"></iframe><br />
<h2>
Handle raw turkey like kryptonite</h2>
<div class="bodytext">
Treat all raw fowl with great care. There is a good chance that it has <em>Salmonella, Campylobacter,</em>
or some other pathogenic bacteria in it. Research shows that about 2/3
of modern poultry has been contaminated by the time you get it home.
That's just a fact of life nowadays. But don't worry. Cooking kills
bacteria. If you cook poultry properly, you are perfectly safe.</div>
<div class="bodytext">
How
do so many birds get so yucky? Pathogens are in the soil and in the
air. Even "free range", "pasture raised", "natural", and "organic" birds
are easily contaminated because they scratch and peck in dirt and grass
that is teeming with bacteria, and because they eat insects, worms,
larvae, seeds, etc. They often step in each other's poop and they peck
in it. You can't prevent it unless you put them in diapers.</div>
<div class="bodytext">
Most
turkeys are grown by "independent" farmers who work under contract to
big brand marketers like Butterball and Perdue. They are highly
competitive because they know that we shop for bargains so they use
efficient, inexpensive, mass production farming methods. These
concentrated animal feeding operations (CAFOs) , sometimes called
factory farms, are designed to deliver big breasted birds grown to
market size in only 4 to 5 months, much faster than nature intended, at
the lowest possible prices. Birds are then processed in slaughterhouses
and high speed disassembly lines. During the process, poop can get on
their skin, on the gloves of the workers, on the conveyor belts, and in
the water baths that are used to remove feathers and rinse the meat. It
is practically impossible to prevent contamination, and it can happen on
small farms, too.</div>
<div class="bodytext">
So
you must handle raw poultry like kryptonite. Thoroughly wash your
hands, tools, counter tops, cutting boards, sink, platters, and anything
that contacts uncooked poultry.</div>
<div class="bodytext">
The
best solution, pun intended, is to buy an empty spray bottle at the
drug store and fill it with a dilute solution of water and household
bleach. Bleach is a powerful sanitizer. That's why they put it in
swimming pools. <span class="hilight">USDA recommends a solution of one tablespoon of good old fashioned 5% unscented, liquid chlorine bleach per gallon of water</span>.
After washing your cutting board, knives, meat grinder, counters, and
sink, thoroughly wet their surfaces with the bleach solution and allow
it to stand for several minutes. Rinse with clear water and air dry or
pat dry with clean paper towels that can be discarded. Cloth towels are
germ carriers. Store the bleach solution in the bottle, tightly sealed,
and use it often. It will remain potent for months. And I don't care
what you've read on the internet, vinegar will not do the job. Click
here to read more about <a href="http://www.amazingribs.com/tips_and_technique/food_safety.html" sl-processed="1">food safety</a>.</div>
<h2>
Meat temp: Taste vs. safety</h2>
<div class="bodytext">
Confusion
abounds over the proper temperature to which you must heat turkey for
safety and for max tenderness and juiciness. One of the problems is that
USDA changed the recommended minimum temperature for cooked poultry in
2006. Until then USDA said we should cook white meat to 160°F and dark
meat to 180°F, and if you were cooking a whole bird, take it all up to
180°F. The new recommendation is 165°F for any and all parts of turkey
and chicken. That means cookbooks published in 2006 or earlier are
wrong. Worse, many celebrity cooks seem never to have gotten the word
and it is common to hear them tell us to desiccate our birds by
overcooking them to 180°F. Click here for a complete guide to <a href="http://www.amazingribs.com/tips_and_technique/meat_temperature_guide.html" sl-processed="1">the proper cooking temps for all meats, both USDA and restaurant chef recommendations</a>.</div>
<table border="0" cellpadding="0" cellspacing="6" style="width: 345px;">
<tbody>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td class="bodytext" width="228"><strong>Benchmarks</strong></td>
<td class="bodytext_centered" width="40"><div align="center">
<strong>°F</strong></div>
</td>
<td class="bodytext_centered" width="31"><div align="center">
<strong>°C</strong></div>
</td>
</tr>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td bgcolor="white" class="bodytext" width="228">Recommended cooking temp</td>
<td bgcolor="white" class="bodytext_centered" width="40"><div align="center">
325</div>
</td>
<td bgcolor="white" class="bodytext_centered" width="31"><div align="center">
163</div>
</td>
</tr>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td bgcolor="white" class="bodytext" width="228">USDA recommended serving temp</td>
<td bgcolor="white" class="bodytext_centered" width="40">165</td>
<td bgcolor="white" class="bodytext_centered" width="31">74</td>
</tr>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td bgcolor="white" class="bodytext" width="228">Remove from heat when breasts hit</td>
<td bgcolor="white" class="bodytext_centered" width="40"><div align="center">
160</div>
</td>
<td bgcolor="white" class="bodytext_centered" width="31"><div align="center">
71</div>
</td>
</tr>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td bgcolor="white" class="bodytext" width="228">Ideal temp for dark meat</td>
<td bgcolor="white" class="bodytext_centered" width="40">175</td>
<td bgcolor="white" class="bodytext_centered" width="31"><div align="center">
79</div>
</td>
</tr>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td bgcolor="white" class="bodytext" width="228">Popup thermometers pop at</td>
<td bgcolor="white" class="bodytext_centered" width="40"><div align="center">
185</div>
</td>
<td bgcolor="white" class="bodytext_centered" width="31"><div align="center">
85</div>
</td>
</tr>
<tr>
<td bgcolor="white" class="bodytext" width="16"></td>
<td bgcolor="white" class="bodytext" width="228">Bacteria start dying at</td>
<td bgcolor="white" class="bodytext_centered" width="40"><div align="center">
130</div>
</td>
<td bgcolor="white" class="bodytext_centered" width="31"><div align="center">
54</div>
</td>
</tr>
</tbody></table>
<div class="bodytext">
<br /></div>
<div class="bodytext">
Dark
meat has about 9% fat, 33% more than white meat, so it tastes and feels
best at about 175°F. White meat is very lean, about 6%, and it dries
out quickly if it is overcooked. It is at its best texture and juiciness
at about 155°F, but that's 10°F below the USDA recommendation and I
can't risk a lawsuit by telling you to serve turkey at that temp. So I
will advise you to cook it to 160°F and let the temp rise to 165°F while
it moves from cooker to carving. More on this later.</div>
<div class="bodytext">
USDA
wants to keep things simple for us in order to keep us safe. Admirable!
What USDA doesn't tell you is that microbes start croaking at about
130°F. The hotter the food gets, the faster the pathogens die. You can
pasteurize your turkey at 130°F in 2 hours or at 165°F in 2 seconds,
hence the USDA recommended minimum of 165°F. What the USDA doesn't tell
you is that you can kill them all if you heat the bird to 160°F for 7
seconds, 155°F for 23 seconds, or 145°F for about 4 minutes.</div>
<div class="bodytext">
Chefs who cook <em><a href="http://www.amazingribs.com/tips_and_technique/thermodynamics_of_cooking.html#sous_vide" sl-processed="1">sous-vide</a></em>
(the ultimate low and slow cooking) know this. They put cut up turkey
parts in plastic bags, vacuum seal them, and place them in water baths
at 150 to 160°F for 2 to 3 hours and the results are incredibly tender,
tasty, and safe. But most of us don't have expensive calibrated
sous-vide water bath cookers, and even then, if you aren't careful,
there is risk.</div>
<div class="bodytext">
In
2011, for the first time, USDA gave a nod to the concept that time and
temp work together to make food safe when it revised the recommended
temp for pork. They lowered it to 145°F <em>for 3 minutes.</em> The
world would be a better place if the turkey lobby was as effective as
the pork lobby. For more on how time and temp work together in the
process of pasteurizing meat, read my article on <a href="http://www.amazingribs.com/tips_and_technique/food_safety.html" sl-processed="1">food, knife, and grill safety</a>.</div>
<h2>
Conduction heating and carryover cooking
</h2>
<div class="bodytext">
The USDA doesn't factor in carryover either. Carryover is simple physics.</div>
<div class="bodytext">
In
a 325°F oven, the surface of the meat will slowly warm. This warming is
the process of exciting the molecules so they move faster. It takes
time because the meat is a combination of water, fat, and protein, and
they are good insulators.</div>
<div class="bodytext">
As
the surface warms it conducts its heat slowly inward to the cooler
cells beneath, passing it along like a bucket brigade. Excited molecules
get their neighbors excited by bouncing off them like billiard balls.
Slowly the heat marches towards the center.</div>
<div class="bodytext">
As
the exterior passes the heat along, it loses heat so the bucket brigade
prevents the surface from zooming up to 325°F. Also, moisture on the
surface evaporates cooling the surface in the same way sweat cools you
off on a hot day. If the meat is thin, the heat builds up rapidly. If it
is thick, it takes much longer to get to the desired temp in the
center. The trick is to get the center to the target temp without
overcooking the exterior. One technique is to baste the exterior, but
that keeps the skin wet and soft, and we want it dry and crisp. Another
technique is to cook low and slow. We'll keep the temp at 325°F, which
is medium, and I'll explain why later.</div>
<div class="bodytext">
Interestingly,
the meat keeps cooking after you take it out of the heat. The hot outer
parts continue to pass their heat inward and in 15 to 30 minutes after
coming out of the oven, the center of the muscle can rise another 5°F.
The heat also escapes into the air, so we don't want to leave the meat
sitting around too long.</div>
<div class="bodytext">
<span class="instructions"><img alt="carryover cooking" border="0" height="120" src="http://www.amazingribs.com/images/recipes/carryover.jpg" width="325" /></span></div>
<div class="bodytext">
In
this illustration, on the left we have a piece of meat cooking at
325°F. It is absorbing heat from all sides, the outer surfaces are
hottest and the heat is passed to the center by conduction. In the
center picture, the meat has been removed from the oven. Heat continues
to be passed towards the center, even though it is sitting at room temp,
and some of the heat is escaping into the surrounding air. On the
right, the meat has come close to an even temp throughout and now it is
cooling as more heat escapes.</div>
<div class="bodytext">
To be absolutely safe and still have moist and tender whole birds, and to make sure nobody sues me, you should <em>serve</em>
turkey at 165°F in the deepest part of the meat and test it in multiple
locations with a good digital thermometer. At my house I usually take
the meat up to 160°F and let it rise 5°F by carryover.</div>
<h2>
Cooking temp</h2>
<div class="bodytext">
I
recommend you cook whole turkey at 325°F. Readers know that I love low
and slow and many of my recipes recommend a 225°F setting. That's a
great temperature for gently melting tough collagen-based connective
tissues without getting their protein panties in a bunch and squeezing
out moisture (see my article on <a href="http://www.amazingribs.com/tips_and_technique/meat_science.html" sl-processed="1">meat science</a>).</div>
<div class="bodytext">
But turkey doesn't have the same composition as pork
ribs or beef brisket, so we don't need to worry about melting tough
collagens. Turkey can handle higher temps, and higher temps are needed
to render the fats in the skin in order to crisp it. The higher temp
helps brown the skin in the short cooking time allotted.</div>
<div class="bodytext">
We want brown skin because when cooking, brown means deep rich, complex taste. Browning is the result of a process called the <a href="http://www.amazingribs.com/tips_and_technique/cooking_glossary.html#maillard" sl-processed="1">Maillard reaction</a>
and, although it starts at low temps, it really kicks in at about 310°F
when amino acids and sugars form scores of scrumptuous new compounds.
This chemical reaction is responsible for the rich flavors in toasted
bread, coffee beans, and dark beer.</div>
<div class="bodytext">
At 325°F you can render more fat from the skin and
get the skin crispier. Nothing worse than soggy wet flabby rubbery skin,
and that's what you get at low temps.</div>
<div class="bodytext">
On the other hand, we don't want to cook turkey too
hot. Recently I have been seeing more and more recipes for cooking
turkey at high temps, like 500°F. This just risks incinerating the skin
and flies in the face of physics as shown in the illustration here. High
temps are fine for thin cuts like 3/4" steaks because we want the
exterior dark with the interior at 130°F, much lower than turkey. But
turkey breasts are much thicker than most steaks and we need to allow
enough time for the heat to travel to the center. At high temps, by the
time the heat penetrates, the exterior and outer layers are overcooked
and dry.</div>
<div class="bodytext">
Besides,
at higher temps the window of opportunity opens and closes too quickly.
The amount of time at which the meat is properly cooked in the center
is short, and in short order it is overdone. Slow pitches are easier to
hit than fastballs.</div>
<div class="bodytext">
So
325°F is a nice compromise. High enough to benefit from the Maillard
reaction on the skin and to melt some of the fat, hot enough to
gelatinize connective tissues, but not flamethrower hot, not risking a
badly overheated outside of the meat before the center is cooked.</div>
<h2>
If you can't hit 325°F</h2>
<div class="bodytext">
If you have a smoker or grill that doesn't get to
325°F (some smokers won't, especially gassers and electrics), you will
need to cook longer. Don't sweat it. The skin will should still be brown
because the Maillard reaction can still take place at lower temps, but
at a much slower pace. Besides, the smoke is going to darken things,
too. But you may not get really crispy skin. If the skin isn't crisp by
the time it hits 145°F, put it in an indoor oven or on a grill at 400°F.
</div>
<h2>
Cooking time</h2>
<div class="bodytext">
<span class="hilight">A clock cannot tell you when food is cooked. Only a thermometer can do this.</span>
Turkeys are notoriously unpredictable in the wild and only slightly
less so in the oven. The two most important factors in determining
cooking time are the cooking temp and the thickness of the thickest
piece of meat, the breast. But actual cooking time will vary depending
on how well it is defrosted, whether or not you brined or injected, what
temp your fridge is, if it sat at room temp for a while, how close your
bird is to the gravy pan, how well your cooker holds a steady 325°F,
the quality of your thermometers, airflow within the cooker, humidity in
the cooker, and the breast size of your bird.</div>
<table bgcolor="white" border="0" cellpadding="0" cellspacing="8" class="fltrght" style="width: 239px;">
<tbody>
<tr>
<td bgcolor="#a6a6a6" class="bodytext" width="223"><div align="center">
<strong>Pounds</strong></div>
</td>
<td bgcolor="#a6a6a6" class="bodytext" width="118"><div align="center">
<strong>Hours at 325</strong>°<strong>F</strong></div>
</td>
</tr>
<tr>
<td bgcolor="#a6a6a6" class="bodytext" width="223"><div align="center">
12 to 14</div>
</td>
<td bgcolor="#a6a6a6" class="bodytext" width="118"><div align="center">
2 to 2.5</div>
</td>
</tr>
<tr>
<td bgcolor="#a6a6a6" class="bodytext" width="223"><div align="center">
14 to 18</div>
</td>
<td bgcolor="#a6a6a6" class="bodytext" width="118"><div align="center">
2.5 to 3</div>
</td>
</tr>
<tr>
<td bgcolor="#a6a6a6" class="bodytext" width="223"><div align="center">
18 to 24</div>
</td>
<td bgcolor="#a6a6a6" class="bodytext" width="118"><div align="center">
3 to 3.5</div>
</td>
</tr>
<tr>
<td bgcolor="#a6a6a6" class="bodytext" width="223"><div align="center">
24 to 30</div>
</td>
<td bgcolor="#a6a6a6" class="bodytext" width="118"><div align="center">
3.5 to 4</div>
</td>
</tr>
</tbody></table>
<div class="bodytext">
Given all those disclaimers, this table is a <em>rough guide</em>
for how long it will take to get the temp in the deepest part of the
breast to 160°F and the thigh to 170°F. Do not bet on it. Bet on a good
thermometer. If you don't have one, don't blame me if your guests get
tummy aches (or worse), if you keep your guests waiting, or if you serve
shoe leather.</div>
<div class="bodytext">
And
please don't ask me how long a stuffed bird will take. I don't test
recipes with stuffed birds, so I have no idea how long they take. Here's
why: </div>
<h2>
Don't stuff the bird!</h2>
<div class="bodytext">
If you must have bread stuffing (and if you're having me over, you <em>must</em> have bread stuffing) then cook it on the side (some people insist on calling it <em>dressing</em> if it is not in the bird).</div>
<div class="bodytext">
1)
If you stuff the bird, the temp in the center of the stuffing must be
at least 165°F to be safe because juices from the bird get into the
stuffing. By the time the heat penetrates that far, the breast will be
overcooked and void of moisture.</div>
<div class="bodytext">
2) An empty cavity allows heat and smoke and flavor to enter the meat from the inside as well as the outside.</div>
<div class="bodytext">
3) If you don't stuff you can put herbs and other aromatics in the cavity to amp up the flavor. Stuffing does little for flavor.</div>
<div class="bodytext">
4)
Stuffing sticks to the ribs of the turkey. If you use the carcass to
make stock the next day, which you absolutely should do, the bread in
the stuffing will make the stock unappetizingly cloudy.</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 325px;">
<img alt="stuffed turkey" height="673" src="http://www.amazingribs.com/images/recipes/stuffed_turkey2.jpg" width="325" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/stuffed_turkey2.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
If
you cook stuffing outside the bird, you can spread it in a baking pan
and get more crispy brown bits, the bits everybody wants. Or better
still, make muffings (see sidebar).</div>
<div class="bodytext">
If
you absolutely must stuff the bird, precook the stuffing so it is hot.
Then it will help cook the meat and you won't overcook it.</div>
<h2>
How big a bird do you need?</h2>
<div class="bodytext">
There
are several variables to consider when deciding how much meat to buy.
Do you want leftovers? What is your male to female ratio? How many young
children will there be? How many big eaters will there be? Are adult
beverages in play? How many appetizers and snacks? What are the side
dishes and how many? When does the football game start?</div>
<div class="bodytext">
As
a rule of thumb, 1 to 1.5 pounds raw weight per person usually will be
more than enough. When you subtract bones, giblets, and shrinkage, you
will lose about 20%. I usually plan on 2 pounds per person so those who
want leftovers can take some home (make sure you have plenty of aluminum
foil or zipper bags on hand).</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 340px;">
<img alt="large and small turkey" height="530" src="http://www.amazingribs.com/images/recipes/large_small_turkey2.jpg" width="340" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/large_small_turkey2.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
If
you need a lot of turkey, and space permits, it is better to cook two
small birds than one giant bird. They will cook faster and be more
tender and juicy.</div>
<div class="bodytext">
Here's
why: The bigger the bird, the thicker the breasts and the longer it
takes to cook the center of the breasts to proper doneness. By the time
they are done, thinner parts are overcooked, and the outer parts of the
breasts are dry.</div>
<div class="bodytext">
Cooking
two smaller birds will actually take less time than one large bird and
it will not take any longer time than one smaller bird if you get the
cooker up to the proper temp.
</div>
<h2>
What you need to know about turkeys
before you go shopping</h2>
<div class="bodytext">
Today's
grocery store turkeys are the result of decades of selective breeding.
The Broad Breasted White used by Butterball, Perdue, Smithfield,
Jennie-O, and most other major brands has been bred smaller to fit
modern family sizes, with larger breasts to satisfy the demand for white
meat, with a metabolism that lets them grow to market size rapidly, and
with all white feathers because dark feathers make black spots on the
skin. They account for 99% of all turkeys on the market.</div>
<div class="bodytext">
Because
most people don't own a quality digital thermometer, and, as a result,
they overcook their turkeys, most manufacturers inject a liquid brine,
about 2% salt, into their turkeys. Salt is a great flavor amplifier if
you don't overdo it. The injection of a brine adds liquid helping to
keep the meat moist. And remarkably, salt helps keep the moisture in. It
seems the electrical charges in salt alter the structure of the
proteins in the meat, a process called denaturing, and the denatured
proteins become more hydrophilic, meaning they glom onto water and hold
it tight. Finally, salt has antimicrobial properties.</div>
<div class="bodytext">
Because
processors are allowed to inject up to 8% of the weight of the bird,
this also adds to their profit. Let's do the math: If 8% of a 20 pound
bird is injected brine, that's 1.6 pounds. If the bird sells for $1.25
per pound on sale, that's $2 for that salt water, more when it is full
price!</div>
<span class="hilight">Turkeys
that say "basted" or "self-basted" or "enhanced" have been injected
with a salt solution and possibly flavor enhancers and tenderizers.
"Kosher" birds have been salted on the outside and inside the cavity
because it was thought in ancient times that this would draw out the
blood</span>.<br />
<div class="bodytext">
Now
catch this: If a bird has had salt and water injected, the law still
allows it to be labeled "natural" or "organic" because salt and water
are natural ingredients! In fact, the word natural has no legal meaning
and it is widely misused. Remember, this is a country where Congress
once decided to classify pizza as a vegetable!</div>
<div class="bodytext">
But
salt is not evil. It is an "essential nutrient" which means it is
necessary for good health and you must ingest it because your body
doesn't make it. <em>Excessive </em>salt consumption can be hazardous, but not moderate consumption.</div>
<div class="bodytext">
So
let's do the math: An ounce of Butterball turkey (which has neither
butter nor balls) contains about 65 mg sodium. So an 8 ounce portion of
turkey, a pretty nice serving, will contain 520 mg. If you are on a low
sodium diet, <a href="http://my.clevelandclinic.org/healthy_living/nutrition/hic_low-sodium_diet_guidelines.aspx" sl-processed="1">the Cleveland Clinic recommends you keep your daily intake down to 2,000 mg</a>, so that serving of turkey is only 1/4 of the recommended daily amount <em>for someone whose doctor has told them to watch their salt intake</em>. No sweat. For the rest of us? Chow down!</div>
<div class="bodytext">
Nowadays
finding a bird that has not been salted is almost a mission impossible.
To get a bird that is not pumped, you need to special order it, go to a
specialty store like Whole Foods, or buy it directly from a farmer.
Some butchers develop relationships with local farmers and will take
orders for fresh birds. Another good source is a Community Supported
Agriculture (CSA) organization which you can find through <a href="http://www.localharvest.org/" sl-processed="1" target="_blank">LocalHarvest.org</a>. </div>
<div class="bodytext">
For more about salt and how important it is to your health, read my article on the <a href="http://www.amazingribs.com/recipes/my_ingredients/zen_of_salt.html" sl-processed="1">Zen of Salt</a>. Also recommended, my articles on the <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/zen_of_brines.html" sl-processed="1">Zen of Brines</a> and the <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/zen_of_injecting_meat_and_meat_injections.html" sl-processed="1">Zen of Injecting</a>.</div>
<div class="bodytext">
Now a word about birds labeled "free
range". Yet another case of industry bullying USDA into allowing a
highly misleading term onto the label. The legal definition says
"Producers must demonstrate to the Agency that the poultry has been
allowed access to the outside." In practice, this means the producer
leaves a door open to a small penned in area. The birds rarely go
through the door. The term Pasture raised has no legal definition.</div>
<h2>
Heritage breeds?</h2>
<div class="bodytext">
All turkeys are descendants of the wild turkey <em>Meleagris gallopavo. </em>As
with other animals (hogs for instance) and vegetables (tomatoes for
instance), farmers are rediscovering abandoned "heritage" breeds and
seeds. Narragansett and Bourbon Red are two of several heritage turkeys
that are making a comeback, but they are still hard to find. They are
closer to wild turkeys, with smaller breasts, darker and more flavorful
meat that some people call gamey. Try one before you serve it to the
gang on Turkey Day. They are also much more expensive. But beware. The
term "heritage" is not government-regulated and there is nothing to stop
unscrupulous merchants from labeling any old turkey as "heritage".
</div>
<h2>
Fresh or frozen?</h2>
<div class="bodytext">
"Fresh"
poultry means, according to USDA, that the bird has not been taken
below 26°F by the processor. At that point it is pretty hard (remember,
freezing temp of water is 32°F), but not quite a bowling ball because of
the proteins and other compounds in the liquids, not to mention the
injected salt, prevent it from freezing completely. But ice crystals
will still have formed. USDA inspectors allow up to 2°F tolerance when
testing birds in commerce, so a "fresh" turkey can be held as low as
24°F.</div>
<div class="bodytext">
Ice
crystals are larger than water molecules, and they are sharp. When ice
crystals form, the water expands and the sharp edges punch holes in
muscle fibers, allowing precious moisture to escape. That's the pink
liquid in the bag. Called "purge", it is mostly myoglobin, a protein
fluid that helps keep meat moist. We won't waste it. It will go in the
gravy, but I would rather have it in the muscles where it belongs. To
make matters worse, some grocers allow turkeys to thaw a bit so they <em>feel</em> fresh.</div>
<div class="bodytext">
I think this phony "fresh" turkey business is bunk and USDA is allowing marketers to deceive the public.</div>
<div class="bodytext">
Sometimes you can buy <em>truly fresh</em>
turkeys with no ice crystals and no purge from a farmer or specialty
butcher who has chilled them to between 32°F and 38°. You may be able to
find truly fresh turkeys raised on Amish-owned family farms. Amish
farmers don't use electricity so the birds aren't processed on fast
moving disassembly lines and they aren't up late surfing the net and
doing things that get them overexcited. They're plucked and cleaned by
hand and are largely free of pinfeathers.</div>
<div class="bodytext">
To
get a truly fresh turkey, usually you have to order it and the butcher
or farmer will give you a pickup date. In Chicago, I occasionally drive
to John's Live Poultry and Egg Market where I can pick a live bird, have
it weighed, slaughtered, and dressed on the spot. I get to keep the
head and feet too.</div>
<div class="bodytext">
The problem is that, when an animal dies the muscles can't get the blood laden oxygen they expect so they get stiff. This <em>rigor mortis</em>
usually sets in within an hour or so, and it doesn't go away until
about 12 hours later, so you don't want to eat a fresh killed bird. Wait
24 hours.</div>
<span class="bodytext"></span><br />
<div style="position: relative; width: 319px;">
<img alt="live turkey for the grill" border="1" height="297" src="http://www.amazingribs.com/images/recipes/live_turkey_1.jpg" width="319" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/live_turkey_1.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
But
fresh meat doesn't stay fresh forever. Buy a truly fresh turkey only if
you are certain it has been killed within a week of the date you will
consume it.</div>
<div class="bodytext">
On
the other hand, in an efficient slaughterhouse operation, turkeys are
flash frozen in extreme cold. This process forms smaller ice crystals
and that helps prevent purge. I would rather have a bird that was flash
frozen right after slaughter than a so-called "fresh" bird that has been
chilled to 26°F and is really only partially frozen, or a truly fresh
bird chilled to 34°F that has been sitting around in the fridge for a
couple of weeks.</div>
<div class="bodytext">
Bottom line: Proper cooking is far more important than having a fresh bird.</div>
<h2>
Here's a timeline</h2>
<div class="bodytext">
Here's a schedule you can follow for a 6 p.m. dinner.</div>
<table border="0" cellpadding="0" cellspacing="0" style="width: 357px;">
<tbody>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td class="small" height="16" width="225">WHAT TO DO</td>
<td class="small" width="127">WHEN TO DO IT</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td bgcolor="#a6a6a6" class="small" height="16" width="225">Begin thawing regardless of size</td>
<td bgcolor="#a6a6a6" class="small" width="127">Friday morning</td>
</tr>
<tr height="15">
<td class="small" height="15" width="5"></td>
<td class="small" height="15" width="225">Unpack bird, check thaw</td>
<td class="small" height="15" width="127">Wednesday morning</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td bgcolor="#a6a6a6" class="small" height="16" width="225">Prep gravy, make the wet rub</td>
<td bgcolor="#a6a6a6" class="small" width="127">Wednesday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td class="small" height="16" width="225">Inject (optional), apply salt</td>
<td class="small" width="127">Wednesday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td bgcolor="#a6a6a6" class="small" height="16" width="225">Preheat cooker and gravy, apply rub</td>
<td bgcolor="#a6a6a6" class="small" width="127">1 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td class="small" height="16" width="225">Put the bird on and add wood</td>
<td class="small" width="127">2 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td bgcolor="#a6a6a6" class="small" height="16" width="225">Add water to gravy pan, remove foil</td>
<td bgcolor="#a6a6a6" class="small" width="127">3 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td class="small" height="16" width="225">Add water to gravy pan if necessary</td>
<td class="small" width="127">4 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td bgcolor="#a6a6a6" class="small" height="16" width="225">Remove gravy, strain, skim fat, taste</td>
<td bgcolor="#a6a6a6" class="small" width="127">4:30 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td class="small" height="16" width="225">Remove bird, heat gravy, carve</td>
<td class="small" width="127">5 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td bgcolor="#a6a6a6" class="small" height="16" width="225">Splash with gravy, serve</td>
<td bgcolor="#a6a6a6" class="small" width="127">5:30 p.m. Thursday</td>
</tr>
<tr height="16">
<td class="small" height="16" width="5"></td>
<td class="small" height="16" width="225">Take a bow</td>
<td class="small" width="127">6:00 p.m. Thursday</td>
</tr>
</tbody></table>
<br />
<h2>
Thawing</h2>
<div class="bodytext">
To
thaw a frozen turkey, place the bird, still in its plastic shipping
bag, in a large roasting pan in the refrigerator. You need the pan
because the bags always seems to leak. Allow 24 hours in the fridge for
every 4 pounds. If you don't want to do the math, just put it in the
fridge 7 days before the day you will eat it. That's a bit more time
than needed, but hey, when you want to catch a train, you get to the
station before the train does, right? Most turkey disasters I hear about
are because the bird has not defrosted properly. There are faster ways
to defrost a bird discussed in<a href="http://www.amazingribs.com/tips_and_technique/thawing_meat.html" sl-processed="1"> my article on thawing</a>.</div>
<div class="bodytext">
A
day before cooking, strip off the plastic bag and remove the organs and
neck from both the front and rear cavities. That's the deep center and
the last part to thaw, so removing them will help insure that the
interior is melted. Just leave the neck and giblets in the pan. We'll
use them later. </div>
<h2>
Don't wash your turkey</h2>
<span class="bodytext">Rinsing poultry in the sink cannot remove <em>Salmonella</em> and <em>Campylobacter</em>
which are often embedded in the muscle. In fact, rinsing makes things
worse by splattering contamination onto the sink and counters.</span><br />
<span class="bodytext">"There's no reason, from a scientific point of
view, to think you're making it any safer, and in fact, you're making
it less safe," said researcher Jennifer Quinlan in an interview on NPR.
Quinlan is a food safety scientist at Drexel University in Philadelphia</span>.<br />
In fact, Drexel has a public service program to educate the public complete with this animation:<br />
<iframe allowfullscreen="" frameborder="0" height="169" src="http://www.youtube.com/embed/JZXDotD4p9c?rel=0" width="300"></iframe>
<br />
<span class="bodytext">"You should assume that if you have chicken,
you have either Salmonella or Campylobacter bacteria on it, if not
both," said Quinlan. "If you wash it, you're more likely to spray
bacteria all over the kitchen and yourself."</span><br />
<h2>
Dry brining
</h2>
<div class="bodytext">
Sprinkle the skin with salt, a technique called <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/dry_brining.html" sl-processed="1">dry brining</a>
only if it has not been injected or koshered. This will help the skin
crisp during cooking because it breaks down the structure of the skin
and dries it out. It will also help season the meat, amplify flavor, and
denature the proteins so they hold water better. Don't cover the bird
with plastic wrap. We want the skin to dry out a bit. This will help you
get skin as crisp as potato chips.</div>
<div class="bodytext">
As much as it pains me to tell you this, <span class="hilight">you <em>can</em> cook a frozen turkey</span>,
but expect the exterior to be overcooked by the time the center is
cooked to a safe temp, so make sure you have gravy. Here are the rules:
(1) You absolutely positively must use a meat thermometer for this
maneuver; (2) you cannot stuff the bird; (3) you may have to cook for an
hour before you can remove the giblet package and neck, but you really
should get them out as quickly as possible, especially if they are in
plastic, which can melt; (3) cooking time will be 1.5 to 2.0 times as
long.</div>
<h2>
<strong>Ingredients f</strong><strong>or the gravy</strong></h2>
<div class="bodytext">
<span class="ingredient">3 quarts [2.8 L] water</span><br />
<span class="ingredient">1 cup [237 ml] apple juice</span><br />
<span class="ingredient">2 onions, skin on, ends removed, cut into quarters</span><br />
<span class="ingredient">2 medium carrots, peeled and cut into 2 inch lengths</span><br />
<span class="ingredient">1 stalk of celery, leaves and all, cut into 2 inch lengths</span><br />
<span class="ingredient">1 tablespoon [15 ml] dried sage leaves</span>, crumbled (do not use powdered herbs, they will cloud the broth)<br />
<span class="ingredient">1 tablespoon [15 ml] dried thyme leaves</span><br />
<span class="ingredient">2 whole dried bay leaves</span></div>
<div class="bodytext">
<em><strong>About the liquids. </strong>You
can ubstitute some of the water with chicken stock, vegetable stock, or
a bottle of a white wine. I usually get a white wine from the closeout
bin of the local liquor store. Oxidized white wine is fine; in fact I
think it adds depth. Just don't use anything that has turned to vinegar.
And never use red wine unless you want purple turkey! I have
occasionally added mushrooms (fresh or dried) to the gravy, too. You can
substitute a small handful of celery leaves for the celery stalk. This
is a good way to get rid of them.</em></div>
<div class="bodytext">
<em><strong>About the onion skins.</strong>
Onion skins contain a pigment that darkens the gravy. Using them in
making stocks is an old chef trick. In fact they are sometimes used as
fabric dyes. If the skins are musty, or the underlayer is mushy or
rotten, discard them.</em></div>
<div class="bodytext">
<em><strong>Add no salt.</strong>
Drippings from the meat will have salt, so wait until you taste the
final gravy and add salt at the end if you think it needs more.</em></div>
<h2>
<strong>Ingredients for the wet rub</strong></h2>
<div class="bodytext">
4 tablespoons of <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/simon_and_garfunkel_rub.html" sl-processed="1">Simon & Garfunkel</a> rub<br />
<span class="ingredient">4 tablespoons </span><span class="ingredient">of vegetable oil or olive oil<br />
1 tablespoon table salt</span></div>
<div class="bodytext">
<em><strong>About the rub.</strong> Click the link above for the recipe.</em></div>
<div class="bodytext">
<em><strong>About the salt.</strong> I know I have
said not to add salt to a salted bird, but this small amount is being
applied to the surface with the rub and will help season the skin.
There's not much, so it's OK.</em></div>
<div class="bodytext">
<em><span class="ingredient"><strong>Optional.</strong>
If you don't want to bother making it (you really should have a bottle
on hand at all times), just use a simple blend of herbs, perhaps 1.5
tablespoons finely chopped or powdered sage</span> (fresh or dried) and <span class="ingredient">1.5 tablespoons thyme leaves</span> (fresh or dried).</em></div>
<h2>
<strong>Ingredients for the bird</strong></h2>
<div class="bodytext">
<span class="ingredient">1 turkey, any size<br />
</span><span class="ingredient">1 medium onion, cut in quarters, skin on</span><br />
3 cloves of garlic, coarsely chopped<br />
<span class="ingredient">2 large sprigs of fresh sage or thyme</span>, about 3 to 4" long<br />
Peel of one orange or lemon<br />
4 ounces [113 gm] or so of hardwood or fruitwood chips</div>
<h2>
Preparing the gravy</h2>
<div class="bodytext">
If you wish, you can do this a day in advance.</div>
<div class="bodytext">
Whatever
you do, don't skip the gravy. I know this whole approach may sound a
little goofy, but trust me: This nectar is a show stopper. First time
out of the gate, follow my recipe closely until you get the concept. The
truth is, now that I've made this umpteen times, I no longer measure
the ingredients.</div>
<div class="bodytext">
This
gravy is not the thick and pasty stuff made with flour that sits on top
of the meat and forms pudding skin. This gravy is a thin, flavorful
broth that penetrates the meat, making it incredibly moist and tasty.
And if Grandma insists on the thick glop, there is more than enough of
my gravy to mix with flour to make her happy. I'll show you how,
reluctantly, below.</div>
<div class="bodytext">
There
is almost always leftover gravy that you can freeze. It makes a killer
soup base or stock for cooking rice, risotto, couscous, or whenever a
recipe calls for stock. I use it to make the gravy for <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/turkey_pot_pies.html" sl-processed="1">turkey pot pies</a> with the leftovers.</div>
<div class="bodytext">
<strong>Method</strong><br />
1) After the bird
has thawed, open the bag it came in and pour the juices into the pan in
which it was sitting. Even if they bird was salted, save those the
juices. They will not be too salty.</div>
<div class="bodytext">
2)
If there is a plastic pop-up thermometer, remove it and discard it. If
you rely on it you will be eating balsa wood. If there is a gizmo
holding the tops of the drumsticks together, remove it. By holding the
thighs and drums tight to the body, it prevents them from cooking
properly and keeps the skin in the bird's crotch from darkening and
crisping. Yes, I know the books tell you to truss the drumsticks.
They're wrong. I'll explain why later.</div>
<div class="bodytext">
3)
Pull the stuff out the cavities. Check both front and rear openings.
Typically you'll find the neck and a bag of "giblets" in there. Put the
neck in the pan. The bag usually contains the heart (looks like a
heart), the gizzard (two marbles connected in the middle), and the liver
(it is the floppy, shiny thing). Put everything except the liver in the
gravy pan. The liver will <em>not</em> be used for the gravy. Freeze it
in a zipper bag and save it along with other chicken and duck livers
until you have enough to make a nice pâté, or toss it in a pan with some
oil, cook it, and feed it to the dog.</div>
<div class="bodytext">
4)
Remove "the part that goes over the fence last", a.k.a. "the Pope's
nose", and trim excess skin and fat from around both cavities, front and
rear, and put them in the pan along with the neck and the juices. Then
whack off the wing tips at the first joint and toss them in the pool.
There's a lot of flavor in them. Don't worry about the fat, you can skim
it later.</div>
<div class="bodytext">
5)
Add the rest of the gravy ingredients to the pan and refrigerate. We
will use it when we cook the bird. Here's the pan before cooking.</div>
<br />
<div class="bodytext">
</div>
<div style="position: relative; width: 320px;">
<img alt="the gravy" border="1" height="217" src="http://www.amazingribs.com/images/recipes/gravy.jpg" width="320" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/gravy.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<h2>
Injecting and/or dry brining</h2>
<div class="bodytext">
If you wish, you can do this a day in advance.</div>
<div class="bodytext">
Injecting
and/or dry brining are two excellent ways to amp up your bird. Since
most grocery store turkeys have already been injected with brine at the
slaughterhouse, there is no need to soak it in brine or inject salt at
home. But if you get a bird that has not been injected, I recommend that
you consider injecting.</div>
<div class="bodytext">
Even
if it has been injected with a salt solution at the slaughterhouse, you
can still inject it with butter. As with salt, butter amplifies
flavors. I've included complete instructions for injecting in the
sidebar at right.</div>
<div class="bodytext">
If your bird has not been salted, I recommend you salt it the day before. You can <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/zen_of_injecting_meat_and_meat_injections.html" sl-processed="1">inject a brine</a> or butter or other flavoring. I use a <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/dry_brining.html" sl-processed="1">dry brine</a>,
just plain salt. Put just a little more than you would if you were
salting it on the table. This salt pulls moisture out of the skin, it
melts the salt, and the salt then diffuses into the skin, and believe it
or not, migrates into the meat. No need to add the rub at this time,
most of the molecules are too large to penetrate, and the oil in the rub
doesn't get along with the water in the meat. Remember, meat is about
75% water, and it is like a saturated sponge, there'not much room in
there for things to work their way in.</div>
<div class="bodytext">
Injecting, however, forces flavor in, and it
squeezes into the spaces between the muscle fibers, not into the fibers.
Salt, however, gets into the fibers.</div>
<div class="bodytext">
In any case, if you can leave the bird exposed to
cold air in the fridge, it helps dry the skin a bit and this helps make
crispy skin. No plastic cover.</div>
<h2>
Preparing the wet rub</h2>
<div class="bodytext">
If you wish, you can prepare the rub a day in advance, but don't put it on til the day of cooking.</div>
<div class="bodytext">
A
dry rub is a mix of spices and herbs rubbed into meat, but for turkey,
we're going to use a wet rub, a mix of herbs, spices, and oil. Wet rubs
are especially effective because many of the flavors in herbs and spices
do not dissolve in water, but they do dissolve in oil. This is
especially true of green herbs. Turkey and herbs get along like peanut
butter and jelly. Click here to read about the <a href="http://www.amazingribs.com/recipes/my_ingredients/zen_of_herbs_spices.html" sl-processed="1">Zen of Herbs and Spices</a>.</div>
<div class="bodytext">
The
wet rub goes under the skin so the herbs and spices can be in intimate
contact with the muscle tissue and don't have to fight their way through
fatty skin. Then we'll put some rub on top of the skin to flavor
everybody's favorite part and because oil helps crisp the skin. If you
don't want to fuss with under ths skin, you won't lose much if it all
goes on the skin.</div>
<div class="bodytext">
I recommend you use my <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/simon_and_garfunkel_rub.html" sl-processed="1">Simon & Garfunkel</a>
poultry rub blend. It's a mix of parsley, sage, rosemary, and thyme
(sing it), with oregano, basil, bay leaf, black pepper, and sugar.</div>
<div class="bodytext">
If
you want to use your own favorite rub, use something without salt if
the bird has been salted at the factory or you have salted it with a dry
brine or injection. My Simon & Garfunkel rub has no salt. Remember,
you can always add salt, but you can't take it away. Click here for <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/index.html" sl-processed="1">more about rubs</a>.</div>
<div class="bodytext">
Sometimes,
if the sage in the garden hasn't frozen by Thanksgiving, I'll put olive
oil or butter and several whole fresh sage leaves under the skin
instead of a wet rub and use the wet rub on the outside of the skin
only. If you click here and look at the picture of the <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/finished_turkey.html" sl-processed="1">finished bird</a>
up close you can see the sage leaves under the skin. They taste great
and look kewl. People will ask about the secret ingredient.</div>
<div class="bodytext">
<strong>Method</strong><br />
1) Mix the herb
blend with the oil and let it sit for a few hours if you have the time.
That helps break down the cells in the herbs and releases their flavors,
but this is not a necessity because the flavors will marry while on the
bird. Why oil and not butter? Butter is not pure oil, it has water in
it so it will not brown as well as other oils. Olive oil or cooking oil
do the job of delivering herbs to the muscle tissues just fine. The
herbs are where the flavor is.</div>
<div class="bodytext">
2)
Pat the skin dry with paper towels, take off your Superbowl ring, and
gently push the herbs and oil under the skin covering the breasts.
Spread it out and work it as far down to the thighs and legs as
possible. Try to avoid leaving behind large clumps.</div>
<div class="bodytext">
3)
Spread the remaining rub on top of the skin. If you run out, rub the
exterior with olive oil or vegetable oil and sprinkle it gently with a
little black pepper, sage, and thyme. Then sprinkle salt on the skin to
help it crisp.</div>
<div class="bodytext">
4) <span class="hilight">Do not tie the legs together.</span>
Most turkeys come with an armature holding the tops of the drums
together. And most cookbooks tell you to tie them up if they didn't come
that way. This just doesn't make sense. Here's why.</div>
<div class="bodytext">
Dark
meat is best at about 175°F, but if you tie the drums together you pin
the thighs tight against the body of the bird and they'll take longer to
cook. So if you remove the bird when the breasts are 160°F, the thighs
will also be about 160°F. But if you let their freak flag fly, heat will
infiltrate them from all sides and, because they are thinner than the
breasts, they will be at 170°F when the breasts hit 160°F.</div>
<div class="bodytext">
Some
chefs tell you to put a Wagnerian breast plate made of foil on the
white meat in order to reflect heat so the thighs can get ahead of them.
Now that is <em>really</em> goofy. A thin layer of foil is not going to
reflect much heat nor is it going to be much of an insulator. All that
will do is retard the browning and crisping of the skin.</div>
<div class="bodytext">
Some
other chefs tell you to put ice bags on the breasts before cooking in
order to chill them so that the thighs will have a head start. One <em>New York Times</em>
expert whom I normally worship even use Ace bandages to hold the
icebags in place so the poor turkey looks like was up all night drinking
Wild Turkey. Just letting the thighs free so hot air can surround them
will do the job just fine, thank you. And doing so has the added bonus
of letting the crotch area brown.</div>
<h2>
Setting up your grill or smoker</h2>
<div class="bodytext">
You
absolutely, positively do not want the bird sitting directly above the
flame or coals unless you have always secretly wanted to run avian
crematorium. The best arrangement for a grill is what is called a <a href="http://www.amazingribs.com/tips_and_technique/2-zone_indirect_cooking.html" sl-processed="1">2-zone setup</a>.
The grill has a hot side with direct heat underneath it, and a cooler
side where the heat flows in from the hot side. We call them the direct
zone and the indirect zone.</div>
<br />
<div style="position: relative; width: 350px;">
<img alt="2 zone aerial view" height="274" src="http://www.amazingribs.com/images/recipes/2-zone_aerial-view.jpg" width="350" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/2-zone_aerial-view.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
The meat goes in the indirect zone and roasts by
convection airflow circulating all around the bird rather than by direct
radiation from the flame. If you have a smoker, they are usually
designed for indirect cooking. If you have a grill, you need to set it
up for 2 zones.</div>
<div class="bodytext">
Long
ago you should have done dry runs sans food with your grill so that by
now you can hit two target temps: 325 and 225°F. Almost all my recipes
call for one or the other and becuase only pellet grills have a
thermostat control, you need to play thermostat. If you haven't <a href="http://www.amazingribs.com/tips_and_technique/calibrating_and_seasoning_your_grill.html" sl-processed="1">calibrated your system</a>, click the link and practice long before you try to cook anything.</div>
<h2>
<a href="" id="setup" name="setup"></a>You don't need a fancy smoker to make a fancy smoked turkey</h2>
<div class="bodytext">
<span class="hilight">A smoker is nice for this
recipe, but the Ultimate Turkey can be done just as easily on a normal
charcoal or gas grill. In fact, it can be done indoors without the smoke
and still turn out a killer meal.</span> For the internet's best buying guide to grills and smokers, <a href="http://www.amazingribs.com/BBQ_buyers_guide/index.html" sl-processed="1">click here</a>. With a grill, it is best to use a <a href="http://www.amazingribs.com/tips_and_technique/2-zone_indirect_cooking.html" sl-processed="1">2-zone setup</a>
(click that link to see exactly what I mean and when you are on that
page click the links that show you how to set up a charcoal grill, gas
grill, offset smoker, or bullet smoker).</div>
<div class="bodytext">
<span class="hilight"></span></div>
<div style="position: relative; width: 345px;">
<img alt="butterflied spatchcocked turke on the grill" border="1" height="472" src="http://www.amazingribs.com/images/recipes/spatchcocked_turkey_no_captions.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/spatchcocked_turkey_no_captions.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
You can make the Ultimate Turkey on just about any
grill. In fact, you can even follow these concepts and techniques and
make it indoors, too. You'll just have to omit the wood. Don't even
think about using wood indoors. You'll never get the smell out of the
place and you'll be sleeping on the couch for weeks.</div>
<div class="bodytext">
Here is a butterflied (spatchcocked) bird on a 30 year old $89 Weber Kettle charcoal grill outfitted with a <a href="http://www.amazingribs.com/BBQ_buyers_guide/barbecue_accessories.html#smokenator" sl-processed="1">Smokenator</a>,
a device that holds the coals off to one side. Notice that the dark
meat is closer to the coals since we want it cooked to a higher temp and
the drip pan about 3" below. Instant read digital thermometer is
reading 159.2°F. That's what I'm talkin' 'bout! Click here to see this
this <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/smoked_turkey_charcoal_grill_setup.html" sl-processed="1">charcoal grill setup</a> up close and personal.</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 345px;">
<img alt="turkey on gas grill setup" border="1" height="247" src="http://www.amazingribs.com/images/recipes/turkey_on_gas_grill.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey_on_gas_grill.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
Above is my 15 year old Weber Genesis gas grill. I
have removed the cooking grates. The bird sits on a wire rack above the
drip pan filled with a flavorful gravy, and the drip pan sits right on
the flame deflector bars. On the left is a disposable aluminum loaf pan
with apple wood chips sitting on the hottest burner. I have covered the
tips of the wings and drums with foil to keep them from burning. The
foil is removed later and about 30 minutes before the bird is done, I
removed the drip pan to firm up the back of the bird. Click here to <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/smoked_turkey_gas_grill_setup.html" sl-processed="1">see this gas grill setup</a> up close and personal.</div>
<h2>
Water pans, drip pans, roasting pans
</h2>
<div class="bodytext">
When setting up for 2-zone cooking, I normally
recommend you put a water pan under the meat. It acts as a heat sink,
absorbing energy and moderating fluctuations. A water pan also puts
humidity in the atmosphere to reduce evaporative cooling and helps keep
the meat moist. If you have a small grill, the water pan can actually
sit between the flame and the meat, casting a heat shadow above it so
the meat doesn't overheat.</div>
<div class="bodytext">
For
this recipe, we replace the water in the pan with the fixins for our
special gravy and it will collect dripping further enriching the gravy.
This gravy/drip pan should have at least 3.5 quart capacity and must be
large enough to fit under the entire bird. The best choices are
stainless steel, ceramic, or CorningWare. Be forewarned, the pan it will
get smoky and need serious scrubbing. Don't use copper because it can
react with the salts and acids in the gravy. I have used a disposable
aluminum pan and noticed no off flavors, but I now have a stainless
steel roasting pan that I use just for outdoor cooking because I got
tired of sleeeping on the couch.
</div>
<div class="bodytext">
You <em>never</em> want to put the bird in liquid
on the bottom of a roasting pan. If you put it in liquid, you will boil
the back and end up with soggy flavorless meat and inedible skin. If you
put it in a dry pan, it will stick and the dripping oils will fry the
back, usually overcooking it. So you'll need a grate for holding the
bird. You can use one from your grill, or even one from your indoor
oven.</div>
<div class="bodytext">
The
tricky part is arranging everything. Because there are so many
different grill designs I can't go through all the options, so grasp the
science and adapt it to your own rig. The ideal setup is to place the
bird on a rack 2 to 3" above the pan so heat and smoke can travel
between them. If the bird is any lower, the mass of the cooler gravy,
evaporation from its surface, and the sides of the pan will conspire to
block heat, airflow, and smoke and you will end up with a pale, soggy,
undercooked bottom.</div>
<div class="bodytext">
The traditional turkey roasting
configuration is a V-shaped rack that sits in a deep roasting pan with
water in the pan to keep the drippings from burning. It is a recipe for
skin as pale as a Seattle sunbather on the bottom and sides, and
undercooked dark meat. I can see you nodding in recognition from here.
</div>
<div class="bodytext">
<img height="240" src="http://www.amazingribs.com/images/recipes/turkey_in_pan2.jpg" width="770" /></div>
<div class="bodytext">
<a href="http://www.genuineideas.com/GEBBio/gebbio.html" sl-processed="1" target="_blank">Dr. Greg Blonder</a>,
is a physicist, entrepreneur, former Chief Technical Advisor at the
legendary Bell Labs, food lover, and the AmazingRibs.com science advisor
and mythbuster. He measured the temps at different levels above the
liquid in a 3" tall pan of water.</div>
<div class="bodytext">
Even
though the oven was 325°F, the liquid never reached boiling temp in the
time it took to cook a turkey. That's because air is a lousy conductor
of heat. You can put your hand in a 325°F oven, but don't put it in
325°F oil. Because the evaporation of water from the surface cools the
liquid in the same way sweat cools us on a hot day, the temp of the
gravy may never get above 175°F.</div>
<div class="bodytext">
As
you can see from the illustration, if the bird is below the lip of the
pan and about 2" above the gravy, the bottom of the bird is in 240°F
high humidity air, 85°F cooler than the top of the bird which is
chugging away nicely in dry heat. That's why turkey backs are so often
as flabby as an elephant's.</div>
<div class="bodytext">
Even
if youp lace the bird on a grate on the lip of the pan, the bottom will
still be much cooler than the top and will almost certainly be
undercooked. He did experiments with a shallow pan and got similar
results.</div>
<div class="bodytext">
In
order to heat the bottom of the bird properly, if you are using a 3"
pan with liquid as I recommend, you need to get the meat 3" above the
pan for the air temp to be 325°F all around.</div>
<div class="bodytext">
If
you can't get your bird above the pan, you should start it breast side
down and turn it over after an hour. Another option is to just remove
the drip pan about 20 minutes before the bird is finished and put its
back above direct heat. Just be sure to watch it carefully so it doesn't
burn and check the temp in the breast before bringing it in.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> <strong>Charcoal grill setup. </strong>Put
the drip pan on one side of the charcoal grate and the charcoal on the
other side and the meat on the food grate above the drip pan. I do not
recommend putting the meat and the drip pan in the center. It is too
easy to burn the thighs and wings that way. See my article on <a href="http://www.amazingribs.com/tips_and_technique/charcoal_grill_setup.html" sl-processed="1">the best setup for a charcoal grill</a>.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> <strong>Gas grill setup. </strong>Put the drip pan on the flame deflectors below the food grate. The bird roosts on the food grate above. See my article on <a href="http://www.amazingribs.com/tips_and_technique/gas_grill_setup.html" sl-processed="1">the best setup for a gas grill</a>.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> <strong><a href="http://amazingribs.com/bbq_equipment_reviews_ratings/equipment-reviews?field_prod_function_tid%5B%5D=2&field_fuel_tid%5B%5D=3&field_manufacturer_target_id=81" sl-processed="1">Weber Smokey Mountain</a> & Other bullet smoker setup. </strong>If
you are using a bullet shaped water smoker like a Weber Smokey
Mountain, try leaving the water pan dry and put the gravy in a pan on
the bottom grate. That should do it. You can use the built-in water pan
for the gravy if you wish. If the water pan is really dirty, line it
with foil or put a pan in there, and add hot water to the gravy. You may
have trouble hitting 325°F this way, though. In order to get it up to
325°F, depending on the outside air temp, you'll probably have to add
more fully lit coals than normal and leave the vents open all the way.
See my article on <a href="http://www.amazingribs.com/tips_and_technique/weber_smokey_mountain_setup.html" sl-processed="1">the best setup for a Weber Smokey Mountain</a>.</div>
<div class="bodytext">
<strong><img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> Kamado or Egg setup.</strong>
You do not want direct heat and only the oval shaped Primo can be set
up in two zones, so you need to put in the deflector plate. The gravy
pan can go on this plate.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> <strong>Gas smoker setup. </strong>Put
the turkey on a shelf high up in the cabinet and the gravy pan on the
bottom shelf. You won't need the built-in water pan. You'll probably
need to set the dial on high.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> <strong>Offset barrel smoker setup. </strong>Put the drip pan on the bottom of the cooking chamber under the cooking grate. See my article on <a href="http://www.amazingribs.com/tips_and_technique/offset_smokers.html" sl-processed="1">the best setup for an offset smoker</a>.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> <strong>Pellet smoker setup. </strong>Put
the drip pan on top of the big deflector plate under the cooking grate
and put the bird on the cooking grate. If you have a pellet smoker that
generates its best smoke at about 200°F or so, start there for about 30
minutes, and then crank it up to 325°F.</div>
<div class="bodytext">
<strong><img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> Electric smoker setup.</strong>
You probably can't get up to 325°F and it will be very humid in there.
That's good for juiciness and tenderness, but bad for the skin. So take
it up to about 145°F internal temp, and then put it in a 400°F oven to
crisp the skin. You can also put it on a hot grill or under the broiler.
Then ask for a charcoal, gas, or pellet smoker for your birthday.
Better flavor too.</div>
<div class="bodytext">
If none of these works for you, try to raise the bird up by placing it on an oven rack sitting on top of several <em>empty</em> tall beer cans (don't write to me if you don't know how to empty them). If they are clean, they can sit right in the drip pan.</div>
<div class="bodytext">
Beware!
A disposable aluminum pan will not hold the rack and a bird without
collapsing, so if you use a disposable pan, it must go under the grill
grate and the bird must go on top of the grill grate. That, or you must
rest a cooking grate on empty beer cans.</div>
<h2>
Finally! Let's cook that bird!</h2>
<div class="bodytext">
Finally!
All the pregame activities are over. It's time to get down to business.
You want to begin by preheating the oven about 5 hours before your
guests are ready to sit down. Yes, your grill or smoker is really an
oven. Get over it.</div>
<div class="bodytext">
1)
Crank your oven/grill/pit up to 325°F or as close as possible as
measured at the level of the cooking grate by a digital thermometer. Do
not measure the temp using the cheap thermometer in the lid unless you
plan to eat the lid. There can be a great difference between the grate
temp and the lid temp.</div>
<div class="bodytext">
2) When it is hot, clean the grate you will cook the bird on <em>before you put the drip pan in.</em>
Week-old grease and gunk the cooking grates will not add the kind of
complexity you want in your gravy. Now put the drip pan and all the
gravy fixins onto the cooker at least 2 to 3" below the bird if
possible.</div>
<div class="bodytext">
3)
If you have a leave-in digital thermometer with a probe on a wire,
insert the probe into the breast so the tip is in the center of the
thickest part of the breast, being careful not to touch the ribs.
Digital thermometers have small sensors and they are very close to the
tip, so they are by far the best. The sensitive areas of a dial
thermometer are too big to be accurate.</div>
<div class="bodytext">
4)
Put the onion (remember to quarter it), garlic, orange peel, and fresh
herbs into the cavity. These aromatics will release aromas and they will
penetrate the meat from the inside of the cavity, along with the smoke.
<span class="hilight">Do not cram them in so tightly that hot air and smoke can't circulate inside. If you must, leave something out.</span></div>
<div class="bodytext">
5)
Grab 4 pieces of aluminum foil, each about 8" square, and coat one side
with vegetable oil so it won't stick. Cover the tops of the wings and
drumsticks with the foil. You did lop off the wing tips and toss them in
the gravy, didn't you? The foil will keep these skinny parts from
burning. You'll take the foil off after an hour, so the skin will brown
and crisp. Oil the skin to help brown it. Any old oil will do.</div>
<div class="bodytext">
6)
Now add your smoke wood. Turkey loves smoke, but too much can ruin it
in a hurry, and there is is a fine line. The first time you try this
recipe I beg you to go easy on the smoke wood. Overdo it and the bird
will taste like an ashtray.</div>
<div class="bodytext">
I've
had good luck with apple, alder, peach, cherry, and oak. Avoid
mesquite, and hickory. They'll work, but I think they're a bit too
strong for delicate lean meats like turkey.</div>
<div class="bodytext">
On
a charcoal grill or smoker, you may not need to add wood at all. The
charcoal will probably give you all the smoke flavor you need. If you do
add wood, you can toss it right on the coals. 2 to 4 ounces by weight
should be enough. Smoke adheres to wet surfaces, so add the wood at the
start of the cook.</div>
<div class="bodytext">
On
a gas grill you'll need 4 to 8 ounces of wood. You may decide after
tasting it that you want more on your next cook, but don't ruin the
first one with too much smoke.</div>
<div class="bodytext">
On
my gas grill I usually place one golf-ball sized chunk of wood right on
a burner in the flame. Chunks smolder slowly, but if you do not have
chunks, you can use chips or pellets.</div>
<div class="bodytext">
T</div>
<div class="fltrght" style="position: relative; width: 180px;">
<img alt="wood packets" border="0" class="fltrght" height="128" hspace="10" src="http://www.amazingribs.com/images/recipes/packets.png" vspace="10" width="180" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/packets.png&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
o
use chips or pellets, make a little pouch of aluminum foil and poke
holes in one side. There is no need to soak the wood. Wood does not
absorb much water. That's why they make boats out of it. Put the packet
as close to the flame as possible. Click here for <a href="http://www.amazingribs.com/tips_and_technique/zen_of_wood.html" sl-processed="1">more on The Zen of Wood</a>.<br />
<br />
<div class="bodytext">
7) <span class="hilight">Place the bird on the cooking rack, breast side up</span><span class="hilight">,</span>
close the lid and don't open it for an hour. That means no basting. Not
if you want crispy skin. Remember, basting just makes the skin wet and
soft.</div>
<div class="bodytext">
8)
After an hour, open the cooker and remove the aluminum foil from the
wings and drums. This lets them brown properly and you will have potato
chip crunchy skin on your wings.</div>
<div class="bodytext">
If
you don't have a thermometer on a wire already in the breast, spot
check the temperature with a good digital instant read thermometer by
inserting the probe into the deepest part of the breast. Push the tip
past the center and pull it out slowly. The lowest temp is the one to
watch for. You can do this occasionally as needed. <a href="http://www.amazingribs.com/tips_and_technique/mythbusting_lookin_aint_cookin.html" sl-processed="1">You won't harm anything by peaking</a>.</div>
<div class="bodytext">
If necessary, add a quart of <em>boiling</em>
water to the gravy pan. Don't add cold water or you can cool off the
cooking chamber. Make sure there are at least 2 inches of liquid in the
pan at all times.<em> Do not let the onions and other solids in the pan burn!</em>
Let them get dark, but not black. While you're under the hood, if you
are using charcoal add another 15 to 20 chunks every hour. Resist the
temptation to reach for the wood chips.</div>
<div class="bodytext">
If
you fear that the bird is progressing too slowly and you are having
trouble keeping the temp up to 325°F, preheat your indoor oven to 325°F
and move the bird and the gravy inside. Finishing it this way is fine.
You will not lose you pitmaster card. The smoke flavor is already in the
bird so now your focus must be on making sure it is not overcooked.</div>
<div class="bodytext">
9)
As the meat temp approaches 160°F in the center of the breast, tilt the
bird and drain the cavity into the gravy. Now check temps all over,
especially the back which can be a bit soggy or even undercooked if it
is very close to the water. If the back isn't 160°F, remove the gravy
pan and put the bird over direct heat to firm it up. This should take no
more than 20 minutes or so, but watch things, because without that
buffer of water, you can burn the back in a hurry.</div>
<div class="bodytext">
Now
it is time to move the bird to the cutting board or a platter. Pick a
platter with a lip that contain the copious juices. A lot of books say
you should put a foil tent on the bird and rest it. <span class="hilight">Don't do it. This just makes the skin soggy. <a href="http://www.amazingribs.com/tips_and_technique/mythbusting_resting_meat.html" sl-processed="1">It does nothing to improve juiciness. </a>Serve your meat hot and crispy. It will get more than enough resting as you move it from the cooker and while you carve.</span></div>
<div class="bodytext">
If
you are going over the river and through the woods with your bird, or
if your bird finishes early, read about how to keep it hot with a <a href="http://www.amazingribs.com/tips_and_technique/faux_cambro.html" sl-processed="1">faux Cambro.</a></div>
<div class="bodytext">
10) <em>Carefully</em>
remove the gravy pan from the cooker. Pour the gravy through a strainer
into a large pot or saucepan. Discard the solids. They have given you
their all. Let it sit for about 10 minutes and with a large spoon or
basting bulb, remove most of the fat. You'll never get it all, so don't
obsess. Besides, fat brings flavor. Now taste the juice under the fat.
It should be rich and flavorful. If you find it too weak bring it to a
boil and cook it down a bit. Taste again and add salt only at the last
minute. If you add salt and then reduce it, it will be too salty.</div>
<div class="bodytext">
<img alt="gravy in a coffee carafe" border="0" class="fltrght" height="200" hspace="10" src="http://www.amazingribs.com/images/accessories/carafe.png" vspace="10" width="114" />I
pour the gravy into a coffee carafe to keep it warm especially when I
have to go to someone else's house for dinner. The fat rises in the
thermos, so I can just pour some off before serving, or shake it up to
mix it in. When you are ready to serve the bird, you can transfer some
of the gravy to a gravy boat or serving bowl if you don't like the looks
of the carafe.</div>
<div class="bodytext">
As
proof of its goodness, when you chill the leftovers it will solidify
into a jelly. That's what happens to melted collagens, they turn to
gelatin, and collagens bring flavor and texture to the table. See my
article on <a href="http://www.amazingribs.com/tips_and_technique/meat_science.html" sl-processed="1">meat science</a> for more on the subject.</div>
<div class="bodytext">
Please
resist the temptation to thicken this gravy with flour or cornstarch.
If the idea is to moisten meat, starchy sauces just don't get the job
done. Starches are large molecules and they can't penetrate the tiny
pores in the meat. The gravy just floats on top like a life preserver
after the ship has gone down. My thin gravy will soak into the meat and
add much more flavor. After you taste my gravy, you won't do the thick
high school cafeteria stuff again. But if there are hardened
traditionalists in the house, in the sidebar I have included
instructions on how to satisfy them.</div>
<h2>
Great movie from a reader
</h2>
<div class="bodytext">
<iframe allowfullscreen="" class="fltrght" frameborder="0" height="315" src="http://www.youtube.com/embed/DkqZ0tes6HI?rel=0" width="560"></iframe>
The talented Jason King of Toronto made this very cool video
demonstrating the whole process in just a few minutes. Kinger, as his
friends call him, says his Mother told him "If you wanna eat you better
learn to cook."</div>
<h2>
Great pix from a reader
</h2>
<div class="bodytext">
Rob
Baas of Alvaton, KY, is a Facebook friend and we have communicated
several times. He has a fun blog called CountrysideFoodRides. <a href="http://countrysidefoodrides.blogspot.com/2012/11/smoked-turkey-recipe.html" sl-processed="1" target="_blank">He documented beautifully in pix many of the steps along the way to the Ultimate Turkey</a>.</div>
<h2>
Carving </h2>
<div class="bodytext">
The
first thing to do is look at the bird and remember who is winning this
contest and remind yourself that you are smarter than a dead turkey. It
is not hard once you understand the logic. Go ahead and parade the whole
bird around the room and take a few bows, but do the carving in the
kitchen, not on the dining table. You need elbow room, you don't need
adoration or the heckling, and you certainly don't need to ruin the
tablecloth.</div>
<div class="bodytext">
The
second thing to do is to reach for the best carving knife you own. Some
folks prefer an electric knife, but I prefer a good carving knife. Just
make sure it is sharp or the skin will give you fits. Good carving
knives should be professionally sharpened every year or so depending on
how often you use them. A honing steel is no substitute for a real
sharpening. You can do it yourself and I recommend some sharpening
devices in my article about <a href="http://www.amazingribs.com/BBQ_buyers_guide/required_kitchen_tools.html" sl-processed="1">required kitchen tools</a>, or you can take your knives (and lawn mower blade) to a pro once a year.</div>
<div class="bodytext">
<img alt="" border="0" class="fltrght" height="61" src="http://www.amazingribs.com/images/accessories/rapala2.jpg" width="280" />I have a nice <a href="https://www.bigpoppasmokers.com/store/meatlocker/knives/meridian-elite-5-knife-set" sl-processed="1" target="_blank">Messermeister Meridian Elite 5 Knife Set</a> but, don't tell my professional chef friends, the knife I reach for most is my cheap<a href="http://www.amazon.com/dp/B000PAXBHO?tag=amazingribs--20&link_code=as3&creativeASIN=B000PAXBHO&creative=373489&camp=211189" sl-processed="1" target="_blank"> Rapala Soft-Grip 7.5"</a>.
This cheapo blade has a thin flexible dangerously sharp blade, a wicked
sharp tip, and it's only about $16. It is not strong enough to cut
through bone, but there is nothing better for cutting things off bones.
When it's dirty, it goes in the dishwasher and you can't do that with
the fancy knives. When it is dull I hone it and when it no longer holds a
razor edge, I chuck it and get a new one. To see all the different
sizes available, <a href="http://www.amazon.com/gp/search?ie=UTF8&keywords=rapala%20knife&tag=amazingribs--20&index=sporting&linkCode=ur2&camp=1789&creative=9325" sl-processed="1" target="_blank">click here</a><img alt="spacer" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=amazingribs--20&l=ur2&o=1" style="border: none !important; margin: 0px !important;" width="1" />. </div>
<div class="bodytext">
Below
I will describe the process of carving a turkey (BTW, carving is much
easier if you butterfly the bird or break it down into parts before you
even cook it). Click here to <a href="http://www.huffingtonpost.com/2011/11/22/how-to-carve-a-turkey-thanksgiving-steps-photos_n_784258.html" sl-processed="1" target="_blank">see an excellent step by step slideshow of the process</a>.</div>
<div class="bodytext">
The
goal is to get as much of the meat off the bones as possible. You want
to slice it across the grain so it is easier to chew, and you want as
many pieces as possible to have a bit of tasty skin.</div>
<div class="bodytext">
1)
Hone the knife with a honing steel. A sharp knife has a razor thin
edge, and with use that edge can bend. A honing steel can straighten it
out. A honing steel is a rod that has a sandpaper like surface. I know
you've see TV chefs hone knives by crossing the steel and knife in front
of them and zip zop, they're done. Don't try it. It's not accurate and
it's a good way to add your bodily fluids to the gravy.</div>
<div class="bodytext">
Begin
by placing the tip of the rod on a table and hold it vertical,
perpindicular to the table. Hold the knife by the handle firmly in your
other hand. Rest the part of the knife closest to your hand against the
top of the steel and tilt it to a 45° angle. Then roll your wrist so it
is halfway between 45° and the steel, about 22.5°. Draw the knife slowly
towards your body gently sliding it downward towards the table at the
same time. Hone the entire blade, right to the tip. Repeat the process
on the other side of the blade. Hone each side alternatively about 3 or 4
times.</div>
<br />
<div style="position: relative; width: 350px;">
<img alt="turkey anatomy 1" border="0" height="282" src="http://www.amazingribs.com/images/recipes/turkey/turkeybreastcolor.jpg" width="350" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey/turkeybreastcolor.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<img alt="turkey front" border="0" height="282" src="http://www.amazingribs.com/images/recipes/turkey/turkeybackcolor.jpg" width="308" /><br />
<br />
<div class="bodytext">
<br /></div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-01.jpg" width="400" /></div>
<div class="bodytext">
2)
After the meat has rested, you can begin to carve. You will need a
cutting board with gutters to catch the ample juices, and a serving
platter or 2. Let's start with the dark meat. Take a paper towel and
grab the top of a drumstick and bend it until the joint between it and
the thigh is visible. Flex it back and forth until you have a good clear
shot at the knee from behind. Sever the meat around the joint, and then
cut between the ball and socket to remove the leg.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-02.jpg" width="400" /></div>
<div class="bodytext">
3)
You can serve the drumstick whole for the cavemen like me, or you can
stand it on the meaty end and slice downward, removing the meat. I
usually carve one and leave one whole.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-03.jpg" width="400" /></div>
<div class="bodytext">
4)
Now pull out those pieces of stiff cartilage with your fingers. Repeat
the process with the other leg.
</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-04.jpg" width="400" /></div>
<div class="bodytext">
5)
Now hold the thigh and cut through the skin that connects it to the
body. Bend the thigh back to find the hip joint. Cut through the ball
joint removing the thigh.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-05.jpg" width="400" /></div>
<div class="bodytext">
6)
You can serve the thigh whole, but then the choicest pieces of dark
meat go to only 2 guests. If you have more people who want thigh meat,
you need to remove the bone so you can slice the meat. To do this, flip
the thigh skin side down, and run the knife around the bone and under it
until you can lift it out.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-06.jpg" width="400" /></div>
<div class="bodytext">
7) Now turn the thigh skin side up and cut it into slices across the grain. Repeat with the other thigh.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-07.jpg" width="400" /></div>
<div class="bodytext">
8)
Now grabbing a wing, bend it back to locate the shoulder joint and cut
through the tendons holding together the ball and socket.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-08.jpg" width="400" /></div>
<div class="bodytext">
9)
Now for the breasts. The old fashioned method was to cut slices off the
breasts while they were still attached to the carcass. There are
several things wrong with this approach. First of all, it is awkward. It
is hard to get even slices especially as your knife approaches the rib
cage, which is curved. The process is even more awkward because the
carcass is wobbly. Besides, it's not fair because the person who gets
the first slice gets most of the skin! The old fashioned method has you
cutting <em>with the grain</em>, and slices cut with the grain is always chewier than slices cut <em>across the grain</em>.
The better plan is to remove each side of the breast from the carcass
and then cut it into beautiful slices across the grain so it is more
tender. Here's how: In the middle of the two lobes is the breast bone,
sometimes called the keel bone. Cut down along one side of the breast
bone with long strokes until the knife hits the rib cage.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-09.jpg" width="400" /></div>
<div class="bodytext">
10)
Then tilt the knife and work along the rib cage with long strokes until
the breast falls away in one football shaped hunk. On the fron the
knife will slide along the wishbone. Don't forget to pull it out from
under the skin flap!</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-10.jpg" width="400" /></div>
<div class="bodytext">
11)
Lay each breast skin side up on a cutting board and slice it across the
grain in slices at least 1/4". I like thicker slices, especially if the
meat is tender. But there is a trick to slicing it properly (I'll bet
you're not surprised to hear that). Remember how we loosened the breast
skin to put rub under it? It is no longer firmly attached to the meat.
If we're not careful the skin will slip slide around and you won't get
neat slices with skin with each slice of meat. The trick is to have a
really sharp knife. Place it on the center of the breast near its
handle. Place the thumb and forefinger of your free hand on either side
of the knife pressing down on the skin gently. In one gentle steady
stroke, with slight downward pressure, draw the knife toward yourself
across the skin, cutting down through it and into the meat. If you use a
dull knife or a serrated knife,or if you use a sawing mothion, the skin
will move around. This takes a bit of practice.</div>
<div class="bodytext">
<img alt="" border="1" height="267" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-11.jpg" width="400" /></div>
<div class="bodytext">
12)
When you have the meat cut, re-assemble it into a breast shaped
presentation in order to keep the meat warm. If you are careful, you can
slide your knife under the assembly and lift the whole thing onto the
serving platter. On second thought, play it safe and use a spatula.</div>
<div class="bodytext">
<img alt="" border="1" height="266" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-12.jpg" width="400" /></div>
<div class="bodytext">
13)
Just before serving the bird, give yourself a reward. Flip the carcass
over so the backbone is facing up. Run your fingers along the sides of
the backbone and near the joints where the wings were attached, right
under the shoulder blades, you'll find tender, juicy blobs of meat, each
about the size and shape of the meat from a large oyster, hence the
nickname,<em> turkey oysters</em>. You can pop them out with your fingers. Savor them for a job well done.</div>
<div class="bodytext">
<img alt="SERVING PlATTER OF BARBECUE TURKEY" border="1" height="500" src="http://www.amazingribs.com/images/recipes/turkey/turkey_carving_-13.jpg" width="751" /></div>
<div class="bodytext">
14) Now pour <em>a little gravy</em> over the top of the meat in the platter, enough to moisten it but not drown it.</div>
<h2>
<a href="" id="carcass" name="carcass"></a>Leftovers and that valuable carcass</h2>
<div class="bodytext">
Do
not discard the carcass. There is plenty of meat left and plenty of
flavor inside those bones. Put it in the fridge. Don't leave it sitting
at room temp for more than 30 minutes.</div>
<div class="bodytext">
1)
Once the guests are gone (or the next day if you're beat), wash your
hands well, and begin pulling all the remaining meat off the carcass.
Set it aside for <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/turkey_supper_salad.html" sl-processed="1">smoked turkey supper salad</a>, <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/turkey_pot_pies.html" sl-processed="1">smoked turkey pot pies</a>, turkey <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/flays_turkey_cuban_sandwiches.html" sl-processed="1">sandwiches</a>, turkey <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/flays_turkey_fajitas.html" sl-processed="1">fajitas</a>, turkey salad, turkey soup, or pulled turkey. The meat freezes well if wrapped tightly in plastic wrap or a zipper bag.</div>
<div class="bodytext">
2)
Take the stripped carcass and break it into chunks. Put it into a deep
pot, cover with water, and toss in 2 chopped carrots, 2 chopped onions
(skins and all), a few celery leaves, a bay leaf, and some herbs. Add
any leftover gravy from when you cooked the bird.</div>
<div class="bodytext">
3)
Bring to a gentle simmer over medium heat. Do not boil yet. Simmer just
below the boiling point for at least 2 to 6 hours. Turn off the heat,
skim the scum, remove the big chunks, set them aside, and strain. Taste
it, but resist the temptation to add salt. You can always add it later,
but you can't take it out. Thin it if you wish or cook it down to make
it more concentrated. I like to concentrate it and freeze it in ice cube
trays. Then I drop the cubes into a zipper bag and label it with the
date. Then pick the boiled meat off the carcass and add it to the other
leftover meat.</div>
<br />
<div class="bodytext">
4)
The next time you are making rice, risotto, couscous, paella, or soup,
use the frozen cubes for a wonderful flavor. Pour some in an ovenproof
bowl, add some <a href="http://www.amazingribs.com/recipes/slaws_salads_and_other_vegetables/caramelized_onions.html" sl-processed="1">caramelized onions</a>,
float a toasted crouton on it, put some muenster cheese on top, stick
it under the broiler, and you've got a killer French onion soup.</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-43766074962563450062013-11-28T10:15:00.000-08:002013-11-28T10:15:00.447-08:00The Ultimate Turkey: More Tips<aside class="rght-side-400">
<div class="bodytext">
</div>
<div style="position: relative; width: 345px;">
<img alt="thanksgiving dinner" border="1" height="425" src="http://www.amazingribs.com/images/recipes/thanksgiving_dinner2.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/thanksgiving_dinner2.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<h2>
<strong>Some other recipes for a great turkey and tuber dinner</strong></h2>
<ul>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/other_side_dishes/bread_butter_sage_stuffing.html" sl-processed="1">Bread & Butter Stuffing with Cranberries</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/other_side_dishes/drunken_cranberries.html" sl-processed="1">Drunken Cranberries</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/other_side_dishes/soused_apple_sauce.html" sl-processed="1">Soused Apple Sauce</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/potatoes/worlds_easiest_potato_salad.html" sl-processed="1">Warm French Potato Salad</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/potatoes/garlic_mashed_potatoes.html" sl-processed="1">Garlic Mashed Potatoes</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/potatoes/sweet_potato_steak_fries.html" sl-processed="1">Sweet Potato Steak Fries</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/slaws_salads_and_other_vegetables/french_green_beans.html" sl-processed="1">Crunchy French String Beans</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/slaws_salads_and_other_vegetables/italian_vinaigrette_salad_dressing.html" sl-processed="1">Italian Vinaigrette Salad Dressing</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/slaws_salads_and_other_vegetables/green_salad_with_grilled_apples.html" sl-processed="1">Green Salad With Grilled Apple</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/desserts/pecan_tassies.html" sl-processed="1">Pecan Tassies</a></li>
<li><a class="bodytext" href="http://www.amazingribs.com/recipes/drinks/glogg.html" sl-processed="1">Swedish Glögg</a></li>
<li><a href="http://www.amazingribs.com/blog/the_war_on_thanksgiving.html" sl-processed="1">Fight Back Against The War On Thanksgiving</a></li>
</ul>
<hr />
<h2>
Latkes this year</h2>
This year Thanksgiving and Hannukah fall on the same date for the
first time in more than a century. So why not swap out the mashed
potatoes for latkes?<br />
<span class="bodytext">They are the absolute most perfect use of
potatoes, better even than French fries, is to turn them into potato
pancakes, which have crunchy mahogany edges, crispy golden midsections,
and tender, rich, meaty interiors. They are hash brown on steroids.</span> Click here for the story of <a href="http://www.amazingribs.com/recipes/potatoes/potato_pancakes_latkes.html" sl-processed="1">why latkes are part of the Hannukah tradition, and the Rabbi's wife's recipe</a>.<br />
<br />
<div style="position: relative; width: 325px;">
<img alt="latke" height="256" src="http://www.amazingribs.com/images/recipes/latke2.jpg" width="325" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/latke2.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<br />
<hr />
<h2>
<div style="position: relative; width: 375px;">
<img alt="pretty bird contest winner" height="502" src="http://www.amazingribs.com/images/recipes/1brendagaston.jpg" width="375" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/1brendagaston.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</h2>
<h2>
Enter the Pretty Bird Turkey Shoot Photo Contest </h2>
The picture here was taken by a reader, Brenda Gaston, and it won
her first prize in my annual Pretty Bird Turkey Shoot Contest. Send me a
picture of your bird and you might win one of four great prizes from
Thermoworks, maker of some of my favorite thermometers and timers
including the Thermapen, and you know how I preach thermometers. Click
here to read more about these very cool tools. <a href="http://www.amazingribs.com/recipes/chicken_turkey_duck/pretty_bird_contest.html" sl-processed="1">Click here to see the rules prizes and previous winners</a>.<br />
<hr />
<h2>
Why Thanksgiving is the most important American holiday</h2>
<div class="bodytext">
<em>The following is excerpted from a commentary
that ran in the Chicago Tribune on 11/27/2013, the day before
Thanksgiving. Click here to read the whole article, <a href="http://www.amazingribs.com/blog/the_war_on_thanksgiving.html" sl-processed="1">Fight Back Against The War On Thanksgiving</a>.</em></div>
<div class="bodytext">
Why are we whining about a "War on Christmas" when it is really Thanksgiving that is under fire?</div>
<div class="bodytext">
This year Macy's and many others will be open
Thanksgiving Day and Black Friday starts on Thursday. It was bad
enough that scores of stores opened at midnight, leaving little time for
sleep, but now employers are forcing their "valued" employees to leave
their food, family, and fellowship, and work through the meal and
through the night, not to mention that they are enticing shoppers to
leave the dirty dishes in search of bargains.</div>
<div class="bodytext">
There are a lot of reasons to love Thanksgiving,
chief among them the food, family, and fellowship. But think about this:
Most of us, across the vastness of the nation, across all age groups,
across politics and religion, across time going back 400 years, share a
menu of turkey with dressing made from bread, the humblest and noblest
of foods; potatoes, the most earthy peasant food; cranberries, a bauble
sweet and sour like life itself; something green because it is good for
us; and All-American apple pie.</div>
<div class="bodytext">
OK, at your house you might skip the cranberries or
prefer pumpkin pie, but the thought that so many of us are sharing this
feast, this similar menu, this celebration, this unique national
cultural touchstone, is enough to make me weep, all the more because
food, my great love, is at the center of the action, even more so when I
realize that thousands of you are eating my recipes.</div>
<div class="bodytext">
The Thanksgiving ceremonial repast makes us all part
of an unparalleled time-space continuum. It is truly the most important
American holiday. Don't let them win the War on Thanksgiving. I look
forward to dining with you every year.</div>
<hr />
<h2>
My #1 top tip: Use digital thermometers</h2>
<div class="bodytext">
Turkey is unforgiving and your guests are
unforgetting. Undercook, and turkey is slimy and after dinner everyone
is praying to the porcelain god. Overcook, and you have attic
insulation. The most important thing to do when cooking turkey is to hit
the target temps on the money. Good news: It's easy with the right
tools.</div>
<div class="bodytext">
Take a look at the calendar. This is the digital
age. Bi-metal dial thermometers were invented in the 1800s, and all but
the most expensive models can most charitably be called indicators, not
precision measuring instruments.</div>
<div class="bodytext">
Cooking without a good digital thermometer is like
driving without a speedometer, flying without an altimeter, building
furniture without a tape measure, filling your tires without a pressure
gauge, or repairing the reactor without a Geiger counter. Digital
thermometers are inexpensive, fast, and accurate. They will pay for
themselves in one steak dinner or one trip to the doctor.</div>
<div style="position: relative; width: 345px;">
<img alt="thermometer comparison" border="1" height="269" src="http://www.amazingribs.com/images/recipes/thermometer_comparison.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/thermometer_comparison.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<div class="bodytext">
<span class="hilight">You simply cannot trust the cheap bimetal dial thermometer that the manufacturer installed in your cooker, shown on the right</span>.
Grill manufacturers compete to undercut each other's prices so they are
not about to install a high end thermometer, especially when most of
their grills are used for hot dogs and burgers. They buy bargain
basement. Even the top brands use cheapo thermometers. Look at the
picture above. That dial thermometer is off by 50°F. This is common. And
Hasty Bake is one of my favorite grill makers. They don't make junk
grills.</div>
<div class="bodytext">
Grill thermometers are not only inaccurate, but they
are mounted in the lid, waaaay above the cooking surface. Well, the
temp in the dome can be a lot different than the temp at the grate. The
grate is much closer to the heat source and the dome is closer to the
ambient air. If you are cooking on Thanksgiving Day north of the
Mason-Dixon Line, that air temp is <em>cold.</em></div>
<div class="bodytext">
<span class="hilight">Neither can you trust the popup thermometer that comes inserted in the bird.</span>
The plunger that pops up is anchored in metal that melts at 185°F. At
that temp a turkey breast is more particle board than party. We do not
want our meat to go above 165°F so that 20°F difference is the
difference between succulent and sucky. Worse still, if you stuff your
bird, it is not measuring the temp of the stuffing which is several
inches further away from the heat than the tip of the popup.</div>
<div style="position: relative; width: 333px;">
<img alt="popup thermometer" border="0" height="227" src="http://www.amazingribs.com/images/accessories/popup_thermometer.png" width="333" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/accessories/popup_thermometer.png&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
<span class="hilight">Neither can you trust the bi-metal "instant read" dial thermometer in your kitchen drawer.</span>
In most cases "instant read" means 30 seconds to get at best a ballpark
reading. You need to be able to poke a breast and read it <em>right now</em>.
You need to be able to pull it back gently and see how the temps vary
throughout the meat. Then you need to move on and test the thigh. And
then close the lid before all the heat escapes. If you have a bi-metal
dial thermometer in the kitchen drawer, right now, go and throw it out.</div>
<div class="bodytext">
</div>
<div class="fltrght" style="position: relative; width: 177px;">
<img alt="iGrill barbecue thermometer" border="1" class="fltrght" height="168" hspace="10" src="http://www.amazingribs.com/images/accessories/igrill.jpg" vspace="10" width="177" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/accessories/igrill.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
I use two thermometers when I cook indoors or outdoors: The <a href="http://www.amazingribs.com/BBQ_buyers_guide/thermometer_buying_guide.html#maverick" sl-processed="1">Maverick ET-732 and 733</a>
have two probes. One that can be inserted into the breast and left
there throughout the cook. The other has a clip so it can hover just
above the cooking grate. Both are attached to cables that run from the
probes to the outside of the grill so I can monitor the temperature of
both the meat and the oven at any time without opening the lid. It even
has a wireless monitor that I can sit on the coffee table while I watch
the game, and alarms in case I snooze. There is another good one, the <a href="http://www.amazingribs.com/BBQ_buyers_guide/thermometer_buying_guide.html#igrill" sl-processed="1">iGrill</a> (above), that communicates with my iPhone and iPad via Bluetooth.<br />
<div class="bodytext">
</div>
<div class="fltrght" style="position: relative; width: 126px;">
<img alt="thermapen meat thermometer" border="1" class="fltrght" height="154" hspace="10" src="http://www.amazingribs.com/images/accessories/thermapen.jpg" vspace="10" width="126" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/accessories/thermapen.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
And just for good measure I use one more digital when I'm doing turkey, the super fast <a href="http://www.amazingribs.com/BBQ_buyers_guide/thermometer_buying_guide.html#thermapen" sl-processed="1">Thermapen</a>, that I can use to spot check the meat in multiple locations.<br />
<div class="bodytext">
Good therms will save you a lot of money and grief
in the long run, and nothing will improve your cooking more, outdoor or
in. Please click here for a in depth <a href="http://www.amazingribs.com/BBQ_buyers_guide/thermometer_buying_guide.html" sl-processed="1">buying guide to thermometers</a>.</div>
<hr />
<h2>
Make muffings!</h2>
<div class="bodytext">
Now here's an outside the bird concept: Try cooking
stuffing in well buttered muffin pans so each individual "muffing" will
brown all around making lots more crunchy bits! If you want your
stuffing wet and juicy, there will be lots of gravy from this recipe to
pour over it.</div>
<div class="bodytext">
If you absolutely positively must have the stuffing
in the cavity, then make it very moist, heat it in up to 165°F and stuff
the bird with steaming hot stuffing. Then the meat won't overcook while
waiting for the stuffing to heat up.</div>
<div class="bodytext">
If you must stuff the bird, then cook it at a lower
temp, like 225°F so the exterior will not dry out as much. But you still
must get everything up to 160 to 165°F before you take it off the heat
because juices from the bird will get into the stuffing. For my favorite
stuffing and muffing recipe, see chapter X.</div>
<div class="bodytext">
Want some tips on how to amp up your stuffing? Want a good stuffing recipe? Try David Rosengarten's <a href="http://www.amazingribs.com/recipes/other_side_dishes/bread_butter_sage_stuffing.html" sl-processed="1">Classic Bread & Butter Stuffing With Cranberries.</a></div>
<br />
<div style="position: relative; width: 345px;">
<img alt="" border="1" height="445" src="http://www.amazingribs.com/images/recipes/muffing.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/muffing.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<hr />
<h2>
What is the difference between white meat and dark meat?</h2>
<div class="bodytext">
As much as we are fascinated with breasts in this
easily titillated society, I should set the record straight: Technically
a turkey has one large breast divided by a breast bone. So as to not
confuse, I shall be technically incorrect in this article and refer to
each pectoral muscle as a separate breast.</div>
<div class="bodytext">
Turkey breasts are called white meat because the
muscles are paler than the meat of the legs and thighs. That's because
domesticated turkeys can't fly, so their legs and thighs get more
exercise than the breasts and wings. As a result, the muscles of the
legs and thighs must be more efficient at using oxygen for continuous
muscle contractions over an extended time. These "slow-twitch" muscles
fire slowly and fatigue slowly, so they need more oxygen for fuel. To
supply this oxygen they have more myoglobin and fat in them. Myoglobin
is a pink protein liquid that stores oxygen brought to it by the blood,
and fat is a storehouse of fuel. The pink liquid in the plastic bag the
bird comes in is myoglobin. Dark meat is pink when cooked medium rare
just like pork, but for safety reasons we cook it well past pink until
it turns gray.</div>
<div class="bodytext">
Breast meat is made of "fast-twitch" pectoral
muscles that are good at short bursts of rapid contraction, but they
fatigue quickly. They don't need much oxygen so they have much less of
the pink myoglobin leaving the meat white when cooked.</div>
<div class="bodytext">
Since domesticated birds are largely confined and
get little exercise, none of their muscles have nearly as much myoglobin
for storing oxygen as red meat animals such as beef.</div>
<hr />
<h2>
Salt, brining, and injecting</h2>
<div class="bodytext">
Salt is important because it amplifies flavor and
because it denatures the protein in the muscles helping it hold moisture
in during cooking. </div>
<div class="bodytext">
Nowadays most grocery store turkeys have a salt
solution injected and say so on the label. Kosher birds have also been
salted at the factory. If your bird has salt added, you're good to go.
You don't need to add any more.</div>
<div class="bodytext">
For years I have advocated wet brining unsalted
turkey, but I have changed my tune and I now prefer dry brining and/or
injecting. Yes, I am a flip-flopper, so don't vote for me if I run for
President.</div>
<div class="bodytext">
Wet brining involves submerging the meat in a tub of
salt water. I quit wet brining because it wastes a lot of herbs,
spices, salt, and with some recipes, fruit juice. Salt gets in, but only
a little salt. The rest are wasted because most of their molecules are
too large to penetrate the skin or the meat which are already at water
holding capacity. They just settle on the surface. You can have the same
impact with a good rub. Then the brined bird must be kept chilled,
occupying fridge space or in a cooler that must be watched. Very little
water from the brine enters the bird although some chefs say they think
the meat tastes diluted. Finally, drippings from the bird are salty and
can ruin the gravy. Click here to read more about the science of <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/zen_of_brines.html" sl-processed="1">wet brining</a>.</div>
<div class="bodytext">
Nowadays I dry brine. I simply sprinkle salt on the
surface of the meat 24 hours in advance. It dissolves and gets sucked
into the meat. Click here to learn more about <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/dry_brining.html" sl-processed="1">dry brining</a>.</div>
<div class="bodytext">
Research for AmazingRibs.com by <a href="http://www.genuineideas.com/GEBBio/gebbio.html" sl-processed="1" target="_blank">Dr. Greg Blonder</a>
is fascinating. He took a 12" long tube of lean pork loin and soaked
it in a 6% brine for 24 hours in the fridge. Periodically he lopped off a
cross section and treated it with an indicator that showed salty meat.
After 2 hours the salt had penetrated only 1/4", and after 24 hours the
salt had traveled only 2/3" deep in the meat. When you wet brine or dry
brine, the salt remains pretty close to the surface.</div>
<div class="bodytext">
But when you start cooking the meat, the brine starts moving deep down, seasoning the meat pretty thoroughly.</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 345px;">
<img alt="brined turkey breasts" border="0" height="572" src="http://www.amazingribs.com/images/recipes/brined_turkey_breast.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/brined_turkey_breast.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
Another technique that works well is to inject a brine. Injecting is a sure fire way to get the salt down deep. <span class="hilight">It is the only way to get fats, herbs, spices and other large molecules deep into meat.</span>
By injecting, you don't have to worry about oversalting, you can do it
at the last minute, you have less waste, less cost, no huge containers
are needed, no refrigeration space problems, and the biggest safety
issue is making sure you don't stab yourself.</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 345px;">
<img alt="barbecue injectors, injection needles" border="1" height="151" src="http://www.amazingribs.com/images/recipes/injectors.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/injectors.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<div class="bodytext">
To inject, you need a special hypodermic for food.
For more on the subject and for my poultry brine injection read my
article on <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/zen_of_injecting_meat_and_meat_injections.html" sl-processed="1">The Zen of Injecting</a>.</div>
<div class="bodytext">
In recent years I have hit upon the perfect
solution. Rather than dilute the meat with water by injecting with a
brine, I dry brine and then I inject with butter. Read on:</div>
<hr />
<h2>
Butterballing the meat </h2>
<div class="bodytext">
If your bird has had a salt solution injected at the
factory, or if you dry brined like I do, you can still amp it up and
add richness and flavor by injecting melted butter into the breasts.
This is especially effective because breasdts are so lean. Yes, that's
how Butterball got its name. Alas, they no longer use butter.</div>
<div class="bodytext">
Melt 1 stick of butter (4 ounces) over a low heat.
If the bird is salted, unsalted is best, but the small amount of salt in
salted butter won't make things too salty. If the bird is unsalted,
then use salted butter and dry brine. Use the same tools and methods
described in my article on <a href="http://www.amazingribs.com/recipes/rubs_pastes_marinades_and_brines/zen_of_injecting_meat_and_meat_injections.html" sl-processed="1">injecting</a>.</div>
<div class="bodytext">
I usually inject only the breasts because dark meat
is moister, but you can give it a shot or two if you wish. Because the
meat is pretty full of natural water to begin with, it will not absorb
much butter. You can shoot her up the day before or at the last minute.
It won't make a big difference.</div>
<div class="bodytext">
If there is butter left, add it to the gravy. It has
been contaminated by the needle, so do not put it back in the fridge.
Resist the temptation to put it on the skin because it will turn to a
thick goo and you will be unable to properly rub on the spices and
herbs.</div>
<hr />
<h2>
<div style="position: relative; width: 360px;">
<img alt="turkey in brine" height="327" src="http://www.amazingribs.com/images/recipes/turkey_brine.jpg" width="360" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey_brine.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</h2>
<h2>
Wet brining
</h2>
As I have said elsewhere, although I did it for years, I am no longer
a fan of wet brining. It takes up too much space, is a major hassle,
wastes a lot of juice and spices, doesn't work better than dry brining
and/or injecting, and even pulls juices out of the meat. But I know a
lot of you like to do it, so here's how I used to do it.<br />
You can start this process up to two days in advance, even on a
partially frozen bird. Brine for 12 hours, air dry in the fridge for 24
hours.<br />
Remember, don't wet brine a bird that has been pre-salted at the
factory. I know from first hand experience, and my wife won't let me
forget it. Birds that have been pre-salted are labeled "basted",
"self-basted", "enhanced", or "kosher".<br />
<strong>For the brine</strong><br />
1 cup [237 ml] hot water in a 2 cup measuring cup<br />
1 pound [454 gm] salt (any salt will do)<br />
1 cup [237 ml] white sugar<br />
8 tablespoons of garlic powder (not garlic salt)<br />
6 tablespoons ground black pepper<br />
2 gallons [7.6 L] cold water, apple juice, <em>chicken stock, vegetable stock</em><br />
<strong><em>About the salt.</em></strong><em> The method we use to
mix the brine doesn't care what type of salt you use becuse we are going
by weight not volume. The volume will vary significantly depending on
whether you use table salt, kosher salt, pickling salt, or sea salt, but
the weight remains the same. Sounds weird, but you'll see how it works.</em><br />
<em><strong>About the sugar.</strong> If you are diabetic, you can skip the sugar, although truth be told, very little actually gets into the meat.</em><br />
<strong>Method</strong><br />
1) Add one cup of hot water to a two cup measuring cup. Then pour in
salt, any salt, until the water line reaches 2 cups. It doesn't matter
if you have table salt, kosher salt, or sea salt. The volume may differ
when it is dry, but the weight is the same, and the displacement of the
water is the same. It's called Archimedes' principle.<br />
Pour the slurry into a very clean container large enough to hold the
meat and 2 gallons of water. The best tool is a plastic insulated
cooler. If the cooler is large, you may need to scale up the brine
recipe to make sure the bird is submerged. You can use something like a
large stainless steel pot, but the ice will melt quickly if it doesn't
fit in the fridge and you'll need to add more ice. Do not use an
aluminum pot. It can react with the salt and create off flavors. If you
only have an aluminum pot, line it with a food safe plastic bag such as
the Ziploc XL. But the best tool by far is an insulated plastic cooler.
You can use it later when the bird is done to keep it warm. Just clean
it thoroughly with hot soapy water.<br />
Then add the sugar, garlic, and black pepper. Stir until most of the
sugar is dissolved. The garlic and pepper will not dissolve. Then add
the cold water.<br />
2) Submerge the meat in the brine breast side (the large humped side)
down and refrigerate. If you can't fit it in the fridge toss in a
gallon zipper bag filled with ice. Or two. The bags should be tight so
that when the ice melts it doesn't dilute the brine. If you use a bag of
ice from the store, make sure it is tight so the ice won't melt and
dilute the brine. Clean storebought bags of ice thoroughly with soap and
water and rinse them completely. People often walk on them in the
delivery truck. Another option is to fill a quart juice or soda bottle
with water and freeze it. Then screw on the cap. Wait til after the
bottle has frozen because water expands when it freezes and it can blow
off the cap. Wash off the outside of the bottle thoroughly and toss it
in the brine.<br />
Move the bird around and get the air bubble out of the cavity. You
may need to weight the meat down to submerge it. If you cannot submerge
it, make sure you turn it periodically and extend it's time in the bath.
Let the bird swim in the brine for up to 12 hours in a refrigerator or
other cool place. Keep the brine under 40°F, adding more ice when
necessary. If you can see unmelted ice, it is probably below 40°F.<br />
3) After no more than 12 hours, remove the bird, rinse it thoroughly
inside and out so the exterior will not be too salty, and pat dry. Be
sure not to leave it in the brine longer than 12 hours. Rinsing is
crucial!<br />
4) While the skin is soft and elastic, insert your fingers carefully
between the skin and the meat and loosen it all around so later you can
put the wet rub in there. You can work from both the front and rear, and
reach down to the thighs and wings.<br />
5) If time permits, place the bird on a rack in the refrigerator for 3
hours or more so the skin will dry. You can even leave it there
overnight. This will help make the skin crispy. Make sure you put a pan
under the bird to catch drips.<br />
<hr />
<div style="position: relative; width: 345px;">
<img alt="butterflied turkey spatchcocked turkey" border="1" height="249" src="http://www.amazingribs.com/images/recipes/butterflied_turkey.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/butterflied_turkey.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<h2>
Too tall a Tom? In a hurry? Butterfly that bird.</h2>
<div class="bodytext">
If the lid on your your grill is too low then
butterfly (spatchcock) the bird. If you are in a hurry the bird cooks
more quickly when cut up.</div>
<div class="bodytext">
The cavity will brown better, the bird will cook
faster, and it is easy to get your hands under the skin where the
backbone came out. Butterflies are also easier to carve when done.</div>
<img alt="" border="1" height="116" src="http://www.amazingribs.com/images/accessories/oxo_poultry_shears2.jpg" width="344" />
<div class="bodytext">
You'll need good pair of poultry shears. A knife will work, but shears will work better.<strong> </strong>Get
sturdy stainless blades so you can cut through the ribs. The best
models come apart at the hinge so they can go in the dishwasher. Try <a href="http://www.amazon.com/gp/product/B000ND1YUO/ref=as_li_ss_tl?ie=UTF8&tag=amazingribs--20&link_code=as3&camp=211189&creative=373489&creativeASIN=B000ND1YUO" sl-processed="1" target="_blank">OXO Good Grips Professional Poultry Shears</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=amazingribs--20&l=as2&o=1&a=B000ND1YUO&camp=217145&creative=399369" style="border: none !important; margin: 0px !important;" width="1" />, above. In a pinch, tin snips from your tool kit in the garage will do the job.</div>
<div class="bodytext">
1) To butterfly a bird, remove the backbone by
cutting along both sides of it. You don't have to be precise. Rinse off
any dark brown organ parts and discard them, and throw the backbone in
the drip pan.</div>
<div class="bodytext">
2) Cut off the wing tips and toss them in the drip pan, too.</div>
<div class="bodytext">
3) From the front cavity, either remove the wishbone
for the kids, or cut through it with your shears. This will help you
flatten it.</div>
<div class="bodytext">
4) Now you can open the bird up and squish it flat.
You may need to take a knife and make shallow slits on either side of
the breast bone in order to flatten it, but it doesn't have to be
perfectly flat.</div>
<div class="bodytext">
5) Put rub/seasoning on the underside and skip the onion, garlic, etc. for the cavity.</div>
<hr />
<h2>
<span class="bodytext"><div style="position: relative; width: 345px;">
<img alt="barbecue turkeyleg" border="1" height="158" src="http://www.amazingribs.com/images/recipes/turkey_leg.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey_leg.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</span></h2>
<h2>
Total control: Cut the bird in 6 parts</h2>
<div class="bodytext">
If you don't feel obligated by tradition to serve a
whole bird, then consider cutting it into parts. You can then get the
light meat and dark meat cooked perfectly because they are independent
of each other. Try this:</div>
<div class="bodytext">
Remove the backbone and toss it in the gravy. Then
remove the wings. Cut the tips off the wings and throw them in the
gravy. Cut off the thighs at the ball joint where it meets the body.
Bend the drum and thigh away from each other so it is easy to find the
knee joint and cut them apart. Now remove the breasts by running your
knife along the sides of the breast bone and follow the bones with your
kinife along the rib cage until you have two big breasts. By removing
the ribcage you can brown the meat on all sides and it is easier to
slice. Those puny ribs are not effective in keep ing the meat moist no
matter what you have read.</div>
<div class="bodytext">
Preheat the grill in a <a href="http://www.amazingribs.com/tips_and_technique/2-zone_indirect_cooking.html" sl-processed="1">2-zone setup</a>
and shoot for about 325°F in the indirect zone. Start the thighs and
breasts first on the indirect side. After 15 to 20 minutes, add the
drums and wings. Watch their temps individually with an instant read
thermometer. Remove the breasts and the thick part of the wings at 160
to 165°F and the dark meat at 170°F. When the meat hits about 150°F, if
the skins aren't crisp, move the meat over to the direct side. If you
want, you can even go crazy and paint on a sauce. Everything will be
tender, juicy, and finished in about 1.5 to 2 hours because parts cook
more quickly than a whole bird.</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 350px;">
<img alt="sliced turkey breast" height="246" src="http://www.amazingribs.com/sliced_turkey_breast.jpg" width="350" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://www.amazingribs.com/sliced_turkey_breast.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<hr />
<h2>
<div style="position: relative; width: 350px;">
<img alt="bone in turkey breast" height="241" src="http://www.amazingribs.com/images/recipes/turkey_breast.jpg" width="350" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkey_breast.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</h2>
<h2>
<strong>Cooking turkey breasts only</strong></h2>
<div class="bodytext">
If you don't want to do a whole bird, you can get
turkey breasts. They come in three forms, a double breast cut off the
bird with bone in (above), a single boneless breast (below), or two
breasts de-boned and rolled together and held tight with a mesh. The
mesh is a pain to get off after you are done cooking. I much prefer the
bone in breasts or boneless breasts. A 3 to 6 pound breast will be done
in 1.5 to 2 hours at 325°F, and larger breasts will be done in 2 to 2.5
hours. Boneless double breasts tied as roasts take about 2 to 2.5 hours.</div>
<div class="bodytext">
Just follow the same basic concept as for the whole
bird. Inject or dry brine, watch the temp like a hawk circling a flock
of turkeys. You will need to add chicken stock to the gravy because
there will be few drippings and no neck and skin to throw in there.
Another option is to paint them with a Teriyaki or Yakitori sauce.</div>
<div class="bodytext">
But if you're going to the trouble, why not cook the whole bird and savor the leftovers in sandwiches, salads, pot pies... ?</div>
<div class="bodytext">
</div>
<div style="position: relative; width: 345px;">
<img alt="grilled yakitori turkey" border="1" height="320" src="http://www.amazingribs.com/images/recipes/yakitori_turkey.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/yakitori_turkey.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<br />
<hr />
<h2>
</h2>
<h2>
<a href="" id="pink_meat" name="pink_meat"></a><strong>Is pink meat safe?</strong></h2>
<div class="bodytext">
Yes, it can be, <a href="http://www.fsis.usda.gov/wps/portal/fsis/topics/food-safety-education/get-answers/food-safety-fact-sheets/poultry-preparation/is-pink-turkey-meat-safe_/CT_Index" sl-processed="1" target="_blank">according to the US Department of Agriculture (USDA)</a>, if it has been cooked to a temperature of 165°F in the center of the breast.</div>
<div class="bodytext">
First of all, some turkey meat is naturally pink.
According to the USDA "The color of cooked meat and poultry is not
always a sure sign of its degree of doneness. Only by using a food
thermometer can one accurately determine that a meat has reached a safe
temperature. Turkey, fresh pork, ground beef, or veal can remain pink
even after cooking to temperatures of 160°F and higher. The meat of
smoked turkey is always pink."</div>
<div class="bodytext">
In addition, smoked meat turns pink due to a
chemical reaction with the combustion gases and the smoke and the meat.
For the Ultimate Turkey, we take the bird off at 160°F and it will rise
to 165°F even if it is off the cooker.</div>
<div class="bodytext">
Click here for more on what are <a href="http://www.amazingribs.com/tips_and_technique/meat_temperature_guide.html" sl-processed="1">ideal meat temps</a>. Click here for more on <a href="http://www.amazingribs.com/tips_and_technique/thermodynamics_of_cooking.html#maillard" sl-processed="1">meat science and the thermodynamics of cooking</a>.</div>
<h2>
What about red or pink juices?</h2>
<div class="bodytext">
Because of the speed with which commercial turkey
farms grow their birds, it is not uncommon for there to be red or pink
juices in the thigh joints even if the meat is properly cooked to 165°F.
That's because the joints bones have not had a chance to properly
harden. If a little red makes you nervous, even if your thermometer is
at 165°F, after carving, a minute or two in the microwave will take care
of it.</div>
<hr />
<h2>
Rotisseries</h2>
<div class="bodytext">
Rotisseries are a good way to cook meat because the
process of rotating it between hot and cool zones retains juices and
insures even cooking, <span class="hilight">but I don't recommend them for turkey</span>.</div>
<div class="bodytext">
The problem is that you need to truss the bird up
tight on a spit or else the wings and drums go flopping around and get
burned. If you truss your bird, the skin beneath the wings, thighs, and
drums never darkens and stays rubbery. And because the thigh is pressed
tightly against the side, it takes too long to warm and cook through, so
by the time it hits ideal temp, about 170°F, the breast is overcooked.
That's why I recommend cooking turkey untrussed.</div>
<div class="bodytext">
In addition, it is difficult to balance the bird on
the spit. If it is imbalanced it puts serious strain on the motor. I've
heard of them burning out. Replacement motors are usually north of $100.
Some rotisseries come with counterweights that you put on the handle to
balance the whole gizmo, like the weights you put on tires to balance
them. That is a good thing.</div>
<div class="bodytext">
Finally, the bird can rip loose of its moorings, and then you have torn breasts. I say fogeddaboudit.</div>
<hr />
<h2>
Vertical roasters</h2>
<div class="bodytext">
</div>
<div class="fltrght" style="position: relative; width: 160px;">
<img alt="vertical roaster" border="1" class="fltrght" height="167" hspace="10" src="http://www.amazingribs.com/images/accessories/vertical_roaster.jpg" vspace="10" width="160" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/accessories/vertical_roaster.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
If your cooker is tall enough, and most <a href="http://www.amazingribs.com/BBQ_buyers_guide/smokers/egg_kamado_and_ceramic_grills_and_smokers.html" sl-processed="1">eggs, kamados, and ceramic grills</a> are, you may wish to roast the bird vertically. The device you want is a wire armature that supports the bird like the <a href="http://spanek.com/store/page2.html" sl-processed="1" target="_blank">Spanek Vertical Roaster (at right)</a>.<br />
<div class="bodytext">
The advantage of a vertical roaster is that you get
much better airflow up into the cavity than when the bird is reclining
and that means better smoke penetration from the inside as well as more
even and faster cooking. The disadvantage is that you can't easily put
aromatics in the cavity which you can do when the bird is horizontal.
Just make sure the tail sits about 3" above the drip pan for proper
airflow.</div>
<hr />
<h2>
Don't put a beer can up your bird's butt
</h2>
<div class="bodytext">
You don't want a beer can type arrangement or
anything with solid sides because the metal blocks airflow to the cavity
and impedes smoke and heat. And no, the liquid in the can will not add
moisture to the meat, especially where the can is in contact with meat. <a href="http://www.amazingribs.com/tips_and_technique/debunking_beer_can_chicken.html" sl-processed="1">Click here to read the science explaining why beer can chicken and turkey are bad ideas</a>.</div>
<hr />
<h2>
Breasts up!</h2>
<div class="bodytext">
Some people like to cook breast side down because they think fat and juices will percolate down and keep the breast moist.</div>
<div class="bodytext">
But juices simply can't travel much through muscle
fibers which confine them. They are not straws and the breast is not a
jug of juice that flows with gravity. When you sleep on your stomach,
your chest doesn't swell does it? Especially since the fibers in the
breasts run horizontally, not top to bottom. And if they could flow,
pressure would push them up, away from the heat, like the liquid in a
glass thermometer.</div>
<div class="bodytext">
And where would these juices come from? Visualize an
upside down turkey. The breast is maybe 3" thick at most. What is above
it? The cavity. No juices there! Even if the cavity was filled with
liquid, there are no pipelines for juices to travel through. In fact,
the breasts sit on the rib cage and beneath that is the <em>pleura</em>, a semi-permeable membrane that would hamper flow.</div>
<div class="bodytext">
If you turn your bird upside down because you want
fat to baste the breasts, alas, breasts have little fat. It's in the
skin, which would be below the breasts if they were upside down, so
melting fat would just drip out, not bathe the meat.</div>
<div class="bodytext">
Finally, if you cook breast down, you smush the
breasts and put marks on the skin, and if you put the bird in a roasting
pan, the skin will probably not brown properly. Ugly.</div>
<hr />
<h2>
<strong>Give your bird a lift</strong></h2>
<div class="bodytext">
<img alt="bear claws" border="1" class="fltrght" height="112" hspace="10" src="http://www.amazingribs.com/images/accessories/bear_paws3.jpg" width="175" />You'll
need something to lift the hot turkey out of the cooker. You can buy
specialized turkey lifters, but they are mono-taskers. I use my bear
paws (shown here).</div>
<div class="bodytext">
They were designed for pulling pork, but they can do double duty as lifters. <a href="http://www.amazingribs.com/BBQ_buyers_guide/barbecue_accessories.html#bear_paws" sl-processed="1">Click here</a> for more info about these handy tools.</div>
<div class="bodytext">
If you don't want another gadget in the kitchen, you
can lift a turkey with two wooden spoons. Just stick the handle of each
into the front and rear cavity.</div>
<hr />
<h2>
<div style="position: relative; width: 345px;">
<img alt="faux cambro for bbq" border="1" height="244" src="http://www.amazingribs.com/images/recipes/faux_cambro.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/faux_cambro.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</h2>
<h2>
Don't sweat the timing with a faux cambro</h2>
<div class="bodytext">
If you are unsure about what temp your cooker will
settle in at, and variables like the ambient temperature, sun, and wind
can really muck things up, I recommend you put the bird on 30 to 60
minutes early, and when the probe says it is 160 to 165°F, put the bird
into a faux Cambro to keep the bird warm until dinner time. A real
Cambro is an insulated storage box popular with caterers. A faux cambro
is a beer cooler.</div>
<div class="bodytext">
The meat temp will rise about 5°F at first, and an
hour later the temp will have dropped only about 5 to 10°F! Just don't
let it drop below 150°F. If you have a good cooler, it should stay safe
for up to 3 hours. This technique will soften the skin a bit, but that's
better than going cold turkey. So get that cooler cleaned up before you
start cooking.</div>
<div class="bodytext">
The faux cambro is especially handy if you need to
take the bird over the river and through the woods. Click here to read
more about how to use a <a href="http://www.amazingribs.com/tips_and_technique/faux_cambro.html" sl-processed="1">faux Cambro</a>.</div>
<hr />
<h2>
Over the river and through the woods
</h2>
<div class="bodytext">
I know you want to show off, but if dinner is more
than 2 to 3 hours away, you need to cook the bird to 160°F, then chill
the bird and re-heat it to 160°F when you get there. This is called
"serving leftovers for Thanksgiving dinner." Now why would you do that?
The meat will be dry and you'll need a lot of my thin gravy to moisten
it. I strongly recommend you serve freshly cooked meat or let somebody
else cook the bird. If you have to cook the bird and travel more than
two hours, then get there early and cook it there. Re-therming a cooked
bird can take almost as much time as cooking it from scratch.</div>
<div class="bodytext">
You will not enhance your rep with dry meat.</div>
<hr />
<h2>
Granny's gravy</h2>
<div class="bodytext">
If you absolutely must make traditional thick gravy, here's how:</div>
<div class="bodytext">
1) Take about 4 tablespoons of the turkey fat and/or
butter and put it in a saucepan over medium heat with 4 tablespoons of
flour (the ratio is 1:1). Flour tastes better than cornstarch if you do
this properly. Whisk the flour until the mixture is smooth, and keep
whisking until it starts to turn pale amber, about 3 minutes. This is
called a medium <em>roux</em>. The browning cooks the flour and kills
the pasty flavor. You can make it richer by cooking it longer and
letting it get darker, but don't let it turn brown. </div>
<div class="bodytext">
2) Slowly pour 1 cup [237 ml] of the smoked gravy
into the roux, whisking it over medium heat as you pour, and keep
whisking until it thickens and all lumps are gone.</div>
<div class="bodytext">
3) Taste it before you add anything. You will
probably want to add another cup of the thin gravy. You should not need
to add salt and pepper. This should make the traditionalists very happy
because this smoky, enriched stock will make a better gravy than any
they ever had.</div>
<hr />
<div style="position: relative; width: 345px;">
<img alt="turkeys on a farm" border="1" height="234" src="http://www.amazingribs.com/images/recipes/turkeys_on_farm.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/turkeys_on_farm.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
<h2>
Talking turkey trivia</h2>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" />
A mature male is a tom, a female is a hen, an immature male is a jake,
an immature female is a jenny. Some people believe hens are slightly
more tender than toms, but because most turkeys are slaughtered when
young, usually 4 to 5 months old, there is no noticeable difference
according to taste tests by <em><a href="http://www.amazingribs.com/BBQ_buyers_guide/cookbooks_mags.html#cooks" sl-processed="1">Cook's Illustrated</a></em> magazine.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> Wild turkeys can fly short distances to escape hunters. They can run fast, too. Domestic turkeys are too heavy to fly.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" />
The old saw that turkeys are so stupid that they will look up in a
rainstorm and drown is a myth. They can, however, be drowned in gravy.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> The flap of skin on top of the beak is a snood, the flap under the beak is the wattle.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> The gizzard can contain stones to help the turkey with digestion.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> Turkeys are native to North America. They were exported to Europe in the 16th century.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" />
Stop blaming the tryptophan. The reason you fall asleep after dinner is
not because of tryptophan in the turkey. It doesn't have much more of
this essential amino acid than other meats. According to research, the
ratio of tryptophan to food is about the same as a pork chop, chicken,
salmon, beef, lamb chops. You fall asleep because you are exhausted from
cooking, cleaning, inlaws, chasing kids, stuffing your face, and
watching the poor pitiful Lions.</div>
<div class="bodytext">
<img alt="dingbat" border="0" height="9" src="http://www.amazingribs.com/images/dingbats/arrow.gif" width="9" /> Turkeys are nervous, but like being stroked and cuddled. Just like Meathead.</div>
<hr />
<h2>
Ben Franklin and the national bird.<br />
Was he serious?</h2>
<div class="bodytext">
It is often said that Benjamin Franklin (1706-1790)
prefered the turkey to the eagle as our national bird, but it is not
clear that he was serious. The notion comes from <a href="http://www.loc.gov/exhibits/treasures/images/bf0029.jpg" sl-processed="1" target="_blank">a letter he wrote to his daughter</a>,
Sarah Franklin Bache (1768-1807), on January 26, 1784. In the letter he
is critical of the eagle's habits and the artwork depicting it, perhaps
mocking the fact that it took six years for Congress to chose a
national bird. It sounds to me as if Franklin, known for his wit, was
exercising it well:</div>
<div class="bodytext">
"For my own part I wish the Bald Eagle had not been
chosen the Representative of our Country. He is a Bird of bad moral
character. He does not get his Living honestly. You may have seen him
perch'd on some dead Tree near the River, where, too lazy to fish for
himself, he watches the Labour of the Fishing Hawk; and when that
diligent Bird has at length taken a Fish, and is bearing it to his Nest
for the Support of his Mate and young Ones, the Bald Eagle pursues him
and takes it from him.</div>
<div class="bodytext">
"With all this Injustice, he is never in good Case
but like those among Men who live by Sharping & Robbing he is
generally poor and often very lousy. Besides he is a rank Coward...</div>
<div class="bodytext">
"I am, on this account, not displeas'd that the
Figure is not known as a Bald Eagle, but looks more like a Turky. For in
truth, the Turky is in comparison a much more respectable Bird, and
withal a true original Native of America... He is besides, though a
little vain & silly, a Bird of Courage, and would not hesitate to
attack a Grenadier of the British Guards who should presume to invade
his Farm Yard with a red Coat on."</div>
<hr />
<h2>
Wine for turkey: Match the sides, not the bird</h2>
<div class="bodytext">
Turkey, gravy, stuffing, sweet potatoes, cranberry sauce, pumpkin pie. No other meal has such a set menu. So what to serve?</div>
<div class="bodytext">
When cooked properly, turkey can be tasty and moist.
When overcooked, as it often is, the dry meat is neutral and
unexciting. So we moisten it with gravy and cranberry sauce and surround
it with sweet dishes to enliven it.</div>
<div class="bodytext">
If the task of selecting the beverage to accompany
the annual eat-in has fallen to you, remember the sweetness of the
sides, the fact that you are buying for everyone, not just yourself, and
the fact that the average American does not like wine that is very dry.</div>
<div class="bodytext">
What is needed is something quenching to wash down
overcooked white meat, something with a hint of sweetness so it will not
taste bitter beside the sweet side dishes, something tart enough to cut
their sweetness, and something friendly that everybody will love.</div>
<div class="bodytext">
Below are my recommendations for different <em>types</em> of wines. Ask your wine merchant for specific recommendations. They will rarely steer you wrong because they want you back.</div>
<h2>
With a hint of sweetness</h2>
<div class="bodytext">
<strong>German Riesling Kabinett.</strong> German
Riesling is light and fresh, and Kabinett is a grade of wine that is
slightly sweet, but not too sweet. It can be floral and like a handful
of fresh grapes.</div>
<div class="bodytext">
<strong>Austrian Riesling, New York Riesling, </strong>and<strong> Washington State Riesling.</strong>
Occasionally as good as the best German Rieslings, Austrian Rieslings
are good values, and the best New Yorkers and Washingtonians, although
not cheap, can be shockingly good.</div>
<div class="bodytext">
<strong>Alsace Riesling.</strong> Similar to German Riesling, but often a bit more complex from aging in wood barrels.</div>
<div class="bodytext">
<strong>Alsace Pinot Blanc.</strong> Refreshing, tart, complex, with just a hint of sweetness.</div>
<div class="bodytext">
<strong>Alsace Pinot Gris </strong>and<strong> Oregon Pinot Gris.</strong> Light and tart. Steer away from California Pinot Gris. It is usually dull and boring.</div>
<div class="bodytext">
<strong>French Rhone whites, American Viognier, American Rousanne, </strong>and<strong> American Marsanne.</strong> These are bigger wines, richer, complex, but rarely too sharp or harsh. Often reminiscent of tropical fruits.</div>
<div class="bodytext">
<strong>Rosé </strong>and other<strong> pink wines.</strong>
These wines are very refreshing and delightful. Alas, most are too
sweet. But if you can find a good one that is off-dry, it will go well
with your meal.</div>
<h2>
Drier wines</h2>
<div class="bodytext">
If your guests are into wine and prefers them bone dry, and if your meal is more savory than sweet:</div>
<div class="bodytext">
<strong>Sauvignon Blanc </strong>and<strong> Semillon.</strong>
I love these wines, especially Sauvignon Blanc from New Zealand and
white wines from Bordeaux, but they are usually bone dry, and are not
great matches to all the sweet stuff. If your meal is mostly savory, and
your guests winos, go this route.</div>
<div class="bodytext">
<strong>Pinot Noir </strong>and<strong> French Burgundy.</strong>
The best of these are expensive, but they can be lighter than Cabernet
and Merlot, and more tart, making them great foils for rich savory
foods.</div>
<div class="bodytext">
Click here for some websites that are good sources of <a href="http://www.amazingribs.com/links/best_wine_beer_spirits_websites.html" sl-processed="1">specific wine recommendations</a>.</div>
<hr />
<h2>
<div style="position: relative; width: 345px;">
<img alt="frying turkey" height="433" src="http://www.amazingribs.com/images/recipes/frying_turkey.jpg" width="345" /><div style="bottom: 2px; position: absolute;">
<a data-pin-config="beside" data-pin-do="buttonPin" href="http://pinterest.com/pin/create/button/?url=http://www.amazingribs.com/recipes/chicken_turkey_duck/ultimate_smoked_turkey.html&media=http://cdn.amazingribs.com/images/recipes/frying_turkey.jpg&description=Smoked%20turkey%20and%20grilled%20turkey%20taste%20spectacular,%20and%20there%20are%20tricks%20in%20this%20recipe%20that%20make%20it%20the%20ultimate%20barbecue%20turkey%20period,%20smoked%20or%20just%20oven%20roasted." sl-processed="1" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>
</div>
</h2>
<h2>
If you must fry it</h2>
<div class="bodytext">
Frying a turkey is fast, captures a lot of moisture
in the meat, and produces really crisp skin. It is also a great way to
burn down your house or put you in the hospital. I don't think fried
turkey is as tasty as smoked or grilled, so I don't recommend it and I
will not share a recipe for it, but as a safety precaution for those of
you who insist on taking the risk, above is a photo from the nice folks
at <a href="http://www.thermoworks.com/index.html?tw=AMAZINGRIBS" sl-processed="1" target="_blank">ThermoWorks</a> showing the proper way to do it.</div>
<ul>
<li class="bodytext">Notice the bird is suspended in the oil on a rope
so it can be gently lowered and raised. The worst thing you can do is
drop a cold bird into hot oir rapidly. It practically explotedes the oil
out of the pot and onto the flames.</li>
<li class="bodytext">Notice that there is no lid so steam will not build up under the cover.</li>
<li class="bodytext">Notice the foil protecting the gas tube.</li>
<li class="bodytext">Notice the asphalt floor.</li>
<li class="bodytext">Notice the <a href="http://www.thermoworks.com/products/handheld/TW8060.html?tw=AMAZINGRIBS" sl-processed="1" target="_blank">Two-Channel Thermocouple Thermometer with Alarm #TW8060</a> with two <a href="http://www.thermoworks.com/products/probe/tc_penetration.html?tw=AMAZINGRIBS" sl-processed="1" target="_parent">5" Penetration Probes with Flat Cables (103-160)</a>, one in the bird, and one clipped to the side to measure the oil temp.</li>
<li class="bodytext">Here is a video and a song on the subject:</li>
</ul>
<div class="bodytext">
<iframe allowfullscreen="" frameborder="0" height="259" src="http://www.youtube.com/embed/HgGf38ngXHw" width="345"></iframe>
</div>
</aside>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-51510524580454186362013-11-28T08:47:00.000-08:002013-11-28T08:47:00.937-08:00Holiday Poultry Brine<div class="summary" id="intro">
This <a href="http://bbq.about.com/od/poultry/a/aa120906a.htm">poultry brine</a>
adds that great holiday flavor with candied ginger and allspice.
Perfect as a brine for any occasion, this one is perfect for your
holiday turkey.</div>
<h3>
Prep Time: 10 minutes</h3>
<h3>
Cook Time: 20 minutes</h3>
<h3>
Total Time: <span class="duration">30 minutes<span class="value-title" title="PT30M"></span></span></h3>
<h3 id="rI">
Ingredients:</h3>
<ul>
<li class="ingredient">1 1/4 cup salt (2 cups Kosher or coarse salt) </li>
<li class="ingredient">1/2 cup brown sugar</li>
<li class="ingredient">1 gallon vegetable stock</li>
<li class="ingredient">1 tablespoon black peppercorns</li>
<li class="ingredient">1 tablespoon allspice berries</li>
<li class="ingredient">1/2 tablespoon candied ginger</li>
<li class="ingredient">1 gallon ice water</li>
</ul>
<h3 id="rP">
Preparation:</h3>
<div class="instructions">
Pour
vegetable stock into a large pot over a high heat. Add salt, brown
sugar, and spices. Bring to a light boil. Remove from heat and allow to
cool. Pour in ice water and stir to combine.
Place turkey in a large plastic container (at least 4 gallon). Pour brine over top. Refrigerate and brine for 1 hour per pound.
<br />
Thoroughly rinse all the brine from the turkey before cooking.
Otherwise there will be a salty flavor to the turkey. For a more
detailed explanation, see my article on <a href="http://bbq.about.com/od/turkey/ss/aa110808a.htm">brining turkey</a>.</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-78622849635036749472013-10-08T10:53:00.002-07:002013-10-08T10:53:47.407-07:00StormDrane's Blog<div class="region-inner header-inner">
<div class="header section" id="header">
<div class="widget Header" id="Header1">
<div id="header-inner">
<div class="titlewrapper">
Welcome to my blog. Here I've posted photos
of my hobby and share some ideas on things I've learned to make using
decorative and useful knots. If you want to learn, there are
informative links throughout the blog for books and online learning
resources. If you have trouble figuring a knot out, have patience and
keep trying. Click 'Older Posts' at the bottom of the last post on each
page or search the 'Archive' for more.</div>
<div class="descriptionwrapper">
<div class="description">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-XNq4zZiHQFM/UlRGTSOKIzI/AAAAAAAAAd8/gpKskpUyUG0/s1600/StormDrane.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-XNq4zZiHQFM/UlRGTSOKIzI/AAAAAAAAAd8/gpKskpUyUG0/s320/StormDrane.jpg" width="318" /></a></div>
<div class="description">
<br /></div>
</div>
</div>
</div>
</div>
</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-10183836603109301652013-09-09T16:33:00.001-07:002013-09-09T16:33:31.584-07:00Softball Links<ul>
<li><a href="http://gfp.tournamentasa.com/94/">ASA Girls Fastpitch Seattle WA</a><li/>
<li><a href="https://flamefastpitch.org/groups/flame-16u-mccaslin-19147974/">Flame 16U McCaslin</a><li/>
</ul>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-59140673664641082352013-08-23T00:58:00.005-07:002013-08-23T00:58:56.841-07:00Dan Bing<h1>
Recipe 1</h1>
(click <a href="http://chowhound.chow.com/topics/592825">here</a>)<br />
<br />
For 3 pancakes:<br />
<br />
8 Tbs high gluten wheat flour<br />
2 1/3 Tbs corn starch<br />
220 ml water<br />
pinch of salt<br />
<br />
Mix together batter ingredients and let rest 10 minutes (you can also add scallions).<br />
For each pancake, beat 1 egg with 1 Tbs water and 2-3 Tbs chopped scallions and a pinch of salt.<br />
Heat pan, oil lightly, pour 1/3 of batter and let it spread out into a thin pancake.<br />
When half-transparent, flip over and pour egg mixture over and spread evenly.<br />
At this point you can pour a little bit of oil on the side and shake the pan to make it go underneath, for a crispier pancake.<br />
When the egg is halfway set, flip again and cook for a few more seconds.<br />
Roll up (with egg on inside or outside), transfer to plate and cut into sections.<br />
Serve with sweet/spicy sauce or thick soy sauce.<br />
<span id="post_content_4381014_in_place_editor"></span><br />
You can add pork sung, cheese, ham, bacon, etc.<br />
<br />
<br />
<hr />
<h1>
Recipe 2</h1>
(click <a href="http://www.butterfingers.co.za/taiwanese-breakfast-egg-pancake-roll-%E8%9B%8B%E9%A4%85">here</a>)<br />
<br />
One of my favorite Taiwanese foods is our breakfasts. Dan
bing, which means egg pancake, is part of a typical Taiwanese and
Chinese breakfast. You’ll find that different areas make their pancakes
differently. Some make them into a roti-like pancake, whereas my family
makes them into a softer pancake.<br />
<a href="http://www.butterfingers.co.za/taiwanese-breakfast-egg-pancake-roll-%e8%9b%8b%e9%a4%85/dan-bing-egg-rolls" rel="attachment wp-att-1298"><img alt="dan bing egg rolls Taiwanese Breakfast: Egg Pancake Roll (蛋餅)" class="aligncenter size-full wp-image-1298" height="469" src="http://www.butterfingers.co.za/wp-content/uploads/2012/02/dan-bing-egg-rolls.jpg" title="dan bing egg rolls" width="709" /></a> <strong></strong><br />
<strong>Serves 6</strong><br />
<strong>Ingredients:</strong><br />
<ul>
<li>200g all purpose flour</li>
<li>3 cup warm water</li>
<li>1 tsp sunflower or canola oil</li>
<li>½ a cup finely chopped spring onion</li>
<li>Sunflower or canola oil for frying</li>
<li>Pinch of salt</li>
<li>6 eggs</li>
</ul>
<div>
<a href="http://www.butterfingers.co.za/taiwanese-breakfast-egg-pancake-roll-%e8%9b%8b%e9%a4%85/ingredients-for-dan-bing" rel="attachment wp-att-1297"><img alt="ingredients for dan bing Taiwanese Breakfast: Egg Pancake Roll (蛋餅)" class="aligncenter size-full wp-image-1297" height="500" src="http://www.butterfingers.co.za/wp-content/uploads/2012/02/ingredients-for-dan-bing.jpg" title="ingredients for dan bing" width="700" /></a></div>
<div>
</div>
<div>
<strong>Method:</strong></div>
<div>
<ul>
<li>Make the pancake mixture by pouring warm water into the flour and
stirring until it becomes a smooth liquidy paste (like a pancake mix)</li>
<li>Add the spring onions, a pinch of salt and a tsp of oil into the mixture and mix.</li>
<li>Pour enough of the pancake mix into a medium heat pan, like you would a pancake, and let it cook till golden. (step 1)</li>
<li>Flip the pancake and allow the other side to achieve the same result.</li>
<li>Flip the pancake onto a plate.</li>
<li>Roughly, beat one egg into a bowl and pour the mixture into an oiled pan. (step 2)</li>
<li>Allow the egg to fry until the the edges start curling.</li>
<li>Place the pancake over the egg, and allow the egg to cook.</li>
<li>Warm the reverse side of the pancake then allow it to rest on a plate.</li>
<li>Roll it up (like how you would with a cinnamon pancake) and slice into 2cm pieces.</li>
<li>Repeat process to make the rest of the pancakes.</li>
</ul>
</div>
<div>
</div>
<div>
<a href="http://www.butterfingers.co.za/taiwanese-breakfast-egg-pancake-roll-%e8%9b%8b%e9%a4%85/steps-to-make-steam-fried-buns-steps" rel="attachment wp-att-1302"><img alt="steps to make steam fried buns steps Taiwanese Breakfast: Egg Pancake Roll (蛋餅)" class="aligncenter wp-image-1302" height="450" src="http://www.butterfingers.co.za/wp-content/uploads/2012/02/steps-to-make-steam-fried-buns-steps.jpg" title="steps to make steam-fried buns" width="630" /></a></div>
<div>
</div>
<div>
<strong>Suggestions:</strong></div>
<div>
Serve with thick soya sauce and chillies*</div>
<div>
</div>
<div>
<div>
<strong>Tips</strong>:</div>
<div>
To avoid the pancake from sticking to your knife, brush some oil on the blade of your knife while slicing.</div>
</div>
<div>
</div>
<div>
* optional</div>
<div>
</div>
<br />
<div>
<a href="http://www.butterfingers.co.za/taiwanese-breakfast-egg-pancake-roll-%e8%9b%8b%e9%a4%85/ban-bing-egg-pancake" rel="attachment wp-att-1299"><img alt="ban bing egg pancake Taiwanese Breakfast: Egg Pancake Roll (蛋餅)" class="aligncenter size-full wp-image-1299" height="500" src="http://www.butterfingers.co.za/wp-content/uploads/2012/02/ban-bing-egg-pancake.jpg" title="ban bing egg pancake" width="700" /></a></div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-4566088884746944912013-08-23T00:47:00.001-07:002013-08-23T00:48:25.893-07:00Dou Jiang<h1>
Recipe 1</h1>
(click <a href="http://chinesefood.about.com/od/breakfast/r/soybeanmilk.htm">here</a>)<br />
<br />
This popular northern Chinese dish is often eaten for breakfast with deep-fried crullers, and forms the basis of Salty Soybean Milk Soup.<br />
<br />
Serves: 6<br />
<br />
Ingredients:<br />
<br />
2/3 pound soybeans<br />
2 cups sugar<br />
<br />
Preparation:<br />
<br />
Rinse the soybeans until the water runs clear. Put the beans in a pot and add water. (The water should be three times the amount of the soybeans).<br />
<br />
Soak the beans until they expand to 2 or 2 1/2 times. In hot weather, soak the beans for 6 to 8 hours; in cold weather, soak the beans for 12 - 14 hours.<br />
<br />
Drain the beans and discard the soaking water. Add 7 more cups of water. Blend the beans and water in several batches until the beans are finely blended.<br />
<br />
Place the beans and 8 cups water in a cheesecloth bag; squeeze out the liquid. Retain the liquid and discard the sediment left in the cheesecloth bag.<br />
<br />
Bring the retained soybean liquid to a boil over medium heat. Turn the heat to low and cook for 10 minutes to remove the strong taste from the beans. Add sugar to the soybean milk and serve.<br />
<hr />
<h1>
Recipe 2</h1>
(click <a href="http://www.butterfingers.co.za/doujiang-soy-milk-%E8%B1%86%E6%BC%BF">here</a>)
<br />
<br />
<div>
Growing up, soy-based products were never strangers in my home, but
it took me a good few years before I could truly appreciate and enjoy
the flavour of soy milk. Ironically, I was given soy milk for babies
when I was a young warthog. And by warthog, I mean infant.<br />
In Mandarin, we say “doujiang” – ‘dou’ meaning bean and ‘jiang’
meaning liquid/beverage/drink. The reason why the word “nai 奶” (which is
milk) cannot be used is because the word includes a feminine element
(女). The reason for this is that “milk” technically comes from female
mammals and doujiang is far from being an animal product, i.e
vegan-friendly.<br />
<div style="text-align: center;">
<a href="http://www.butterfingers.co.za/doujiang-soy-milk-%e8%b1%86%e6%bc%bf/soy-milk" rel="attachment wp-att-1627"><img alt="soy milk 1024x682 Doujiang (Soy Milk) 豆漿 " class="aligncenter wp-image-1627" height="386" src="http://www.butterfingers.co.za/wp-content/uploads/2012/04/soy-milk-1024x682.jpg" title="soy milk" width="581" /></a></div>
Doujiang is part of a traditional oriental breakfast. This liquid is
an extraction of the soybean and the substance is milk-like, providing
incredibly nutritious properties. You can drink soy milk hot or cold and
since it’s so easily accessible in most retail supermarkets, many
people don’t know how to make their own.<br />
Making your own allows you to have fresh soy milk and avoid all the
preservatives and additives used in cartons. I suppose you can buy a soy
milk machine that can make it for you, but it’s, honestly, such an easy
process – all you need is a blender, muslin cloth and a large pot. My
papa showed me how to make the perfect soy milk.<br />
Makes about 2 litres<br />
<strong>Ingredients:</strong><br />
<ul>
<li>2 Cups of soybeans</li>
<li>8 Cups of water (excluding soaking water)</li>
<li>sugar to taste*</li>
</ul>
<strong>Method:</strong><br />
<ul>
<li>Sift through the dry soybeans, remove stones and bad soy beans, and rinse it a few times with water.</li>
<li>Soak the soybeans overnight in water. Make sure that there is twice
the volume of water compared to the beans. The beans will grow twice
their original size when ready. (step 1)</li>
<li>Blend half the beans with 4 cups of water for 1 minute.</li>
<li>Prepare a colander in a deep soup pot, with a muslin cloth lining the colander</li>
<li>Pour the blended pulpy mixture into the muslin cloth (step 2)</li>
<li>Squeeze all the liquid out into the pot – that is straight soy milk. (step 3)</li>
<li>Blend the rest of the beans and water and repeat the process.</li>
<li>Once all the liquid has been squeezed out, heat the pot up on the
stove at a low temperature. The heating process is amazing because this
is when you can smell the fragrant soy milk.</li>
<li>Keep a close eye on the heating process and mix it every few minutes to avoid the soy milk from sticking to the sides.</li>
<li>Scoop the foam up that’s collecting on the top.</li>
<li>When it starts boiling, simmer for 5 minutes. Don’t forget to keep mixing.</li>
<li>*Add sugar to taste (1/2 cup at most) – this is optional.</li>
</ul>
<div>
<a href="http://www.butterfingers.co.za/doujiang-soy-milk-%e8%b1%86%e6%bc%bf/steps-to-make-soy-milkdojiang" rel="attachment wp-att-1630"><img alt="steps to make soy milkdojiang Doujiang (Soy Milk) 豆漿 " class="aligncenter wp-image-1630" height="450" src="http://www.butterfingers.co.za/wp-content/uploads/2012/04/steps-to-make-soy-milkdojiang.jpg" title="steps to make soy milk/dojiang" width="630" /></a></div>
<strong>Suggestions:</strong><br />
Serve hot or cold or use as an ingredient in another recipe.<br />
<br />
<div style="text-align: center;">
<a href="http://www.butterfingers.co.za/doujiang-soy-milk-%e8%b1%86%e6%bc%bf/soy-milk-p" rel="attachment wp-att-1626"><img alt="soy milk p 682x1024 Doujiang (Soy Milk) 豆漿 " class="aligncenter wp-image-1626" height="922" src="http://www.butterfingers.co.za/wp-content/uploads/2012/04/soy-milk-p-682x1024.jpg" title="soy milk p" width="614" /></a></div>
</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-58408189332104176682013-06-13T13:40:00.001-07:002013-06-13T13:40:22.016-07:00Alphanumeric to Numeric-Only Phone Numbers<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<br />
<pre id="code_snippet" style="background: white; color: black; overflow: scroll;">DECLARE @test TABLE(x VARCHAR(20));
INSERT INTO @test
SELECT '+91 (876) 098 6789' UNION ALL
SELECT '1-567-987-7655' UNION ALL
SELECT 'FR5-5105';
declare @n char(26) = '22233344455566677778889999'
;WITH Num1 (n) AS (SELECT 1 UNION ALL SELECT 1),
Num2 (n) AS (SELECT 1 FROM Num1 AS X, Num1 AS Y),
Num3 (n) AS (SELECT 1 FROM Num2 AS X, Num2 AS Y),
Num4 (n) AS (SELECT 1 FROM Num3 AS X, Num3 AS Y),
Nums (n) AS (SELECT ROW_NUMBER() OVER(ORDER BY n) FROM Num4),
Cleaner AS (
SELECT x, (SELECT CASE WHEN SUBSTRING(x, n, 1) LIKE '[A-Za-z]' Then SUBSTRING(@n, (ASCII(upper(SUBSTRING(x, n, 1)))-64),1)
WHEN SUBSTRING(x, n, 1) LIKE '[0-9]'
THEN SUBSTRING(x, n, 1)
ELSE ''
END + ''
FROM Nums
WHERE n <= LEN(x)
FOR XML PATH('')) AS x_clean
FROM @test)
SELECT x, x_clean
FROM Cleaner;
/*
x x_clean
+91 (876) 098 6789 918760986789
1-567-987-7655 15679877655
FR5-5105 3755105
*/
</pre>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-71101052503821114942013-04-29T17:22:00.001-07:002013-04-29T17:22:10.839-07:0010 Websites That Will Help Drown Out The Noise So You Can Stay Focused<a href="http://www.makeuseof.com/tag/10-websites-that-will-help-drown-out-the-noise-so-you-can-stay-focused/">Goto MakeUseOf Article</a><br />
<br />
<header style="padding: 0;">
<h1 class="entry-title">
<a href="http://www.makeuseof.com/tag/10-websites-that-will-help-drown-out-the-noise-so-you-can-stay-focused/" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused">10 Websites That Will Help Drown Out The Noise So You Can Stay Focused</a></h1>
</header>
<footer>
<ul class="post-info" style="color: #333333; font-size: 14px; ofloat: left; width: 580px;">
<li style="float: left;">
April 23, 2013<br />
</li>
<li style="float: right;"><address class="vcard author" style="min-width: 0; padding: 0;">
By <a class="url fn" href="http://www.makeuseof.com/tag/author/acouch/" style="display: inline;">Aaron Couch</a>
</address>
</li>
</ul>
</footer>
<img alt="" class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Feature-Image2.jpg" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" />Do
you find yourself constantly distracted by everything going on around
you and having a hard time concentrating on what you’re doing? The
solution is noise-cancelling headphones. Whether you’re in a café with a
crying baby two tables away, the office with noisy chatter in the
cubicle next to you or at home with the dog constantly barking,
headphones will do the trick.But headphones are only part of the solution. This is because if you
play music you know, whether it has lyrics or not, you will likely be
distracted by it to some degree. So instead of listening to your
favorite songs, band or even genre, branch out a bit and try something
different – you might be surprised how much it really helps.<br />
<h2>
Focus With Different Sounds, From Rain To Coffee Shops</h2>
One method you can use is sounds, whether its rain and thunder, a
trickling creek, birds, etc., there are a lot of nature sounds
available. In addition to those, there are also plenty of other noises
like ones from a coffee shop, or even just white noise.<br />
<h3>
<a href="http://rainymood.com/">Rainy Mood</a></h3>
<img alt="" class="aligncenter" height="321" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Rainy-Mood.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
<i>Rainy Mood</i> is a website that instantly plays the sound of rain, accompanied by thunder and the subtle chirping of birds. <a href="http://www.makeuseof.com/tag/6-free-white-noise-sites-to-relax-or-set-yourself-to-sleep/">Tina has shared about RainyMood before</a>
and it’s great for an instant solution to focusing sounds. There isn’t a
limit to the audio, the interface is clean and there’s even a video of
the day, which features a song that sounds great accompanied by the
sound of rain.<br />
<img alt="" class="aligncenter" height="501" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Rainy-Mood-with-Video.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="495" /><br />
If you want to control the volume, there’s a one-button toggle at the
bottom of the page that you can use to take the volume from high to
medium to low to mute, and then back to high.<br />
Rainy Mood is also available as a mobile for <a href="https://play.google.com/store/apps/details?id=com.TailoredMusic.RainyMood">Android</a> and <a href="https://itunes.apple.com/ca/app/rainy-mood/id566752651?mt=8">iOS</a>,
both of which cost $4.99. The Rainy Mood website does have a mobile
version, however, and if you don’t need the features of the apps, it is
sufficient.<br />
<h3>
<a href="http://soundrown.com/">SounDrown</a></h3>
<img alt="" class="aligncenter" height="306" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/SounDrown.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
<i>SounDrown</i> features the sound of rain, like Rainy Mood, but instead of just <a href="http://soundrown.com/Rain/">rain</a>, it also features sounds of other environments, like <a href="http://soundrown.com/Coffee/">coffee shops</a>, <a href="http://soundrown.com/Waves/">waves crashing</a> on a beach, <a href="http://soundrown.com/Train/">trains</a>, <a href="http://soundrown.com/Crickets/">crickets</a>, <a href="http://soundrown.com/WhiteNoise/">white noise</a>, <a href="http://soundrown.com/Fountain/">fountains</a>, and even <a href="http://soundrown.com/Kids/">kids</a>.
The interface certainly is up to the quality of Rainy Mood, but if
you’re looking for a bit more variety of sounds, it’s a decent option.<br />
<h3>
<a href="http://www.iserenity.com/">iSerenity</a></h3>
<img alt="" class="aligncenter" height="536" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/iSerenity.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
<i>iSerenity</i> has actually been <a href="http://www.makeuseof.com/tag/sounds-to-help-you-sleep-relax-concentrate-or-wake-up/">mentioned before on MakeUseOf by Jackson</a>.
Since that article, it looks like it has undergone changes. The
interface isn’t the greatest and looks half finished… or half torn
apart. However, the sounds work and that’s what matters, right? There
are various sound themes, from rainforests, to waterfalls to… hairdryers
and vacuums. There are 21 sounds in all.<br />
<h3>
<a href="http://simplynoise.com/">SimplyNoise</a> And <a href="http://rain.simplynoise.com/">SimplyRain</a></h3>
<i>SimplyNoise</i> specializes in “colored” noise, like white
noise, pink noise and brown noise. Basically the colors represent
varying octaves – white is the highest, brown is the lowest. Aside from
these three colored controls, there are also two other buttons for
oscillation and a timer.<br />
<img alt="" class="aligncenter" height="232" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/SimplyNoise.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
<i>SimplyRain</i> is a SimplyNoise website that does exactly what
the name implies – simply plays sounds of rain. In addition to the
volume, oscillation and timer controls that it and SimplyNoise both
have, it also has controls to toggle thunder sounds and adjust the
intensity of the rain.<br />
<img alt="" class="aligncenter" height="273" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/SimplyNoise-SimplyRain.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
When I tried to load both SimplyNoise.com and SimplyRain.com on a
mobile browser, they didn’t load completely. There are however, <a href="http://www.simplynoise.com/appstore/index.html">mobile apps for both iOS and Android</a> that are only $0.99. In addition to the mobile apps, you can also <a href="http://simplynoise.com/downloads.html">download 6 different sounds</a> after donating any amount from as little to $1.00 to $10.00 or more.<br />
<h3>
<a href="http://www.naturesoundplayer.com/">NatureSoundPlayer</a></h3>
<img alt="" class="aligncenter" height="588" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/NatureSoundPlayer.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
<i>NatureSoundPlayer.com</i> has a simple interface and features 8
different sounds from nature. There aren’t any titles, of these sounds
though. Instead, there is an image that describes each sound. For
instance, “waves” has a picture of waves and a beach; “campfire” has a
picture of flames, and so on.<br />
You’re also able to play multiple sounds at a time, allowing you to create your own mix.<br />
<h3>
<a href="http://www.naturesoundsfor.me/">NatureSoundsFor.Me</a></h3>
<img alt="" class="aligncenter" height="499" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/NatureSoundsFor.Me_.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
A website similar to the previous one is <i>NatureSoundsFor.Me</i>,
which allows you to mix four different sounds, but features many to
choose from. Seriously, the selection is impressive and they don’t just
stop at “nature sounds”. They also include ones such as tribal drums,
heart beat, several kinds of birds and other animals, holiday tunes,
even… wait for it… Darth Vader.<br />
In addition to the variety of sounds and the ability to mix 4 of
them, you also have controls for each sound that allow you to adjust the
volume, balance (right and left speakers) and intervals. The interval
feature allows you to break up the sound to add more variance to the
mix. If you want to mute everything without having to drag each volume
control down and messing up your mix, just click the speaker button in
the bottom left corner to pause it.<br />
You’re also able to save the mix as a link or export it as a file to
share with others or access it later without having to remake it. You’re
also able to search compositions created by others by <i>“Top”, “Newest</i>” or “<i>By Sounds”</i>.<br />
<h3>
<a href="http://whitenoise247.net/">WhiteNoise 24/7</a></h3>
<img alt="" class="aligncenter" height="511" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/White.noise_.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="580" /><br />
<i>WhiteNoise 24/7</i> has been <a href="http://www.makeuseof.com/tag/6-free-white-noise-sites-to-relax-or-set-yourself-to-sleep/">mentioned before on MakeUseOf by Tina</a>.
However, contrary to it’s name, WhiteNoise 24/7 doesn’t just do white
noise, but also nature and mechanical sounds. These different sounds are
located under the tabs at the top titled,<i> Unlimited, Nature</i> and <i>Mechanical</i>.
The Unlimited tab features pink and white noise, as well as the sounds
of rain, shower and vents. As the title of this page implies, there’s no
limit to these sound tracks.<br />
The Nature Sounds page features the sounds of a flowing river, hard
rain, ocean waves and rain with the sounds of large droplets. Mechanical
Sounds feature a ventilator, dishwasher, washing machine, static and
shower.<br />
Several of these sounds are also actually available for free downloads.<br />
<h3>
<a href="http://coffitivity.com/">Coffitivity</a></h3>
<img alt="" class="aligncenter" height="181" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Coffitivity-Banner.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
Unlike many of these websites, <i>Coffitivity</i> has a nice,
clean, and modern interface. But that’s not all that counts – its sound
is great too. It’s simply coffee shop sounds – that’s it. The idea
behind Coffitivity is that the ambient sound of coffee shops (and
similar places) combined with music help inspire creativity.<br />
You’ll see on your website that they specifically say Coffitivity
isn’t meant to be listened to by itself, but combined with the music you
listen to. They even provide a helpful graphic displaying the volume
level that Coffitivity should be at in comparison to your music.<br />
<img alt="" class="aligncenter" height="358" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Coffitivity-Graphic.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="589" /><br />
In addition, they also have a lot of interesting information and link to a <a href="http://www.jstor.org/stable/10.1086/665048">huge study</a> that was done to show how the ambient sounds help inspire us creatively.<br />
<h2>
Incorporate “Focus Music” Into Your Workflow</h2>
But what about music? What if sounds just aren’t your thing? I
personally don’t mind sounds – but at the same time, it’s nice to have a
change. However, remember what I said in the second paragraph of this
article about the problem with lyrical music causing distractions? Yeah –
I definitely have that problem. There are two websites specifically
geared toward providing music and beats that will help you stay focused.<br />
<h3>
<a href="mailto:Focus@Will">Focus@Will</a></h3>
<img alt="" class="aligncenter" height="495" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Focus@Will.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
I actually discovered <i>Focus@Will</i> through <a href="http://www.makeuseof.com/tag/focuswill-a-streaming-service-designed-to-help-you-stay-on-task/">Justin’s article</a>,
and since then have been addicted – it’s awesome. The idea behind
Focus@Will is to play music that has no lyrics, doesn’t demand your
attention, allows you to constantly focus and perhaps is a complete
different genre that you aren’t used to, but you still enjoy.<br />
Focus@Will has eight different genres. I find myself listening to the <i>Up Tempo</i>
one the most, but all are fantastic. The website is simple and all of
the controls are nice and big, instead of being hidden and hard to spot.
The controls include a loop mode, which starts a 100 minute
productivity cycle (great for a focused time block); play/pause; next
song, which won’t play that same song again; volume; and a genre
dropdown menu.<br />
The Focus@Will blog has a lot of great information about how to
induce focus with music – even the volume matters. They’re also growing
and are still in Beta, but will be launching mobile apps soon.<br />
<b>NOTE:</b> Focus@Will is currently only available for Chrome browsers.<br />
In addition, refer to some of Justin’s thoughts from <a href="http://www.makeuseof.com/tag/focuswill-a-streaming-service-designed-to-help-you-stay-on-task/">his article featuring Focus@Will</a>:<br />
<blockquote>
<i>Focus@Will plays no ads, and during its beta it’s
also absolutely free. Will that change in the future? Probably, and
because of the nature of the app itself I doubt advertising will play a
role – they would almost certainly break the cycle of focus the app is
trying to create.</i></blockquote>
<h3>
<a href="http://www.getworkdonemusic.com/">Get Work Done Music</a></h3>
<img alt="" class="aligncenter" height="297" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/04/Get-Work-Done-Music.png" title="10 Websites That Will Help Drown Out The Noise So You Can Stay Focused image" width="590" /><br />
<i><a href="http://www.makeuseof.com/dir/get-work-done-music-get-music-that-will-help-you-get-your-work-done/">Get Work Done Music</a></i>
is an even simpler website than Focus@Will. Upon going to the website,
it’s user-ready. It just streams upbeat and primarily non-lyrical music
from <a href="http://www.makeuseof.com/tag/music-lovers-soundcloud/">SoundCloud</a>. Nothing really to learn about it and hardly any controls. There are four buttons: play/pause, <i>Fast</i> and<i> Faster </i>buttons, and a “next song” button called “<i>gimme the next one cap’n”</i><br />
<h2>
Pro Tip: Combine The Two Types</h2>
This tip has already been introduced to you in the section about
Coffitivity, but that isn’t the only website you can use this with.
Perhaps you want to combine some Classical tunes from Focus@Will with
some nature sounds – just have both websites open. The idea is fairly
simple really, but I want to give Coffitivity all the credit, as I
likely wouldn’t have thought it, had they not mentioned it first.<br />
<h2>
Conclusion</h2>
This works! I’m doing it right now and I use these methods literally <i>every</i>
time I write. Having variety is nice though because despite being able
to vary things up a bit on one particular website, having other ones to
choose from helps to mix things up a bit.<br />
You may have noticed that this article focuses primarily on websites.
That doesn’t mean that there aren’t mobile apps out there that do this –
there just weren’t any that really stood out to me. A while back <a href="http://www.makeuseof.com/tag/iphone-apps-to-help-soothe-you-to-sleep/">Jackson covered nine iPhone apps that help you sleep</a>,
although these can likely help you focus too. Don’t be discouraged
though – there are Android apps available. Look through the Android
market for apps with the kinds of features mentioned here in this
article. The really good ones, may come at a small cost.<br />
Do you have any suggestions for websites or apps that you use to help
you focus through the use of sounds, noise and music? Feel free to
share with your fellow readers in the comments – we’d love to hear about
them too!<br />
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-75288750269849059922012-06-25T11:05:00.001-07:002012-06-25T11:10:27.572-07:00Redmond Area Bike Trails (TrailLink.com)<div style="background: white; color: black; overflow: scroll;">
<table border="0">
<tbody>
<tr align="center">
<th scope="col">Map</th>
<th scope="col">Rail-trail</th>
<th scope="col">Trail Name</th>
<th scope="col">State</th>
<th scope="col">Counties</th>
<th scope="col">Length (miles)</th>
<th scope="col">Activities</th>
</tr>
<tr style="background-color: #ccd6eb; line-height: 14px; text-align: left;">
<td><div style="text-align: center;">
<img alt="Trail has spatial data" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><div style="text-align: center;">
<img alt="Trail is a rail-trail" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><a href="http://www.traillink.com/trail/issaquah-preston-trail-(formerly-issaquah-creek-trail).aspx" style="color: blue;">Issaquah-Preston Trail (formerly Issaquah Creek Trail)</a></td>
<td>WA</td>
<td>King</td>
<td>5.80</td>
<td>Bike, Fishing, Horseback Riding, Mountain Biking, Walking, Cross Country Skiing</td>
</tr>
<tr class="searchGridAltRow" style="line-height: 14px; text-align: left;">
<td><div style="text-align: center;">
<img alt="Trail has spatial data" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><div style="text-align: center;">
<img alt="Trail is a rail-trail" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><a href="http://www.traillink.com/trail/preston-snoqualmie-trail.aspx" style="color: blue;">Preston-Snoqualmie Trail</a></td>
<td>WA</td>
<td>King</td>
<td>6.50</td>
<td>Bike, Inline Skating, Fishing, Wheelchair Accessible, Horseback Riding, Walking</td>
</tr>
<tr style="background-color: #ccd6eb; line-height: 14px; text-align: left;">
<td><div style="text-align: center;">
<img alt="Trail has spatial data" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><div style="text-align: center;">
<img alt="Trail is a rail-trail" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><a href="http://www.traillink.com/trail/sammamish-river-trail.aspx" style="color: blue;">Sammamish River Trail</a></td>
<td>WA</td>
<td>King</td>
<td>11</td>
<td>Bike, Inline Skating, Wheelchair Accessible, Horseback Riding, Walking, Cross Country Skiing</td>
</tr>
<tr class="searchGridAltRow" style="line-height: 14px; text-align: left;">
<td><div style="text-align: center;">
<img alt="No spatial data available" src="http://www.traillink.com/images/transparent_pixel.jpg" style="border-width: 0px;" /></div>
</td>
<td><div style="text-align: center;">
<img alt="Trail is a rail-trail" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><a href="http://www.traillink.com/trail/seattle-waterfront-pathway.aspx" style="color: blue;">Seattle Waterfront Pathway</a></td>
<td>WA</td>
<td>King</td>
<td>2</td>
<td>Bike, Inline Skating, Wheelchair Accessible, Walking</td>
</tr>
<tr style="background-color: #ccd6eb; line-height: 14px; text-align: left;">
<td><div style="text-align: center;">
<img alt="Trail has spatial data" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><div style="text-align: center;">
<img alt="Trail is not a rail-trail" src="http://www.traillink.com/images/transparent_pixel.jpg" style="border-width: 0px;" /></div>
</td>
<td><a href="http://www.traillink.com/trail/the-i-90-trail.aspx" style="color: blue;">The I-90 Trail</a></td>
<td>WA</td>
<td>King</td>
<td>8</td>
<td>Bike, Mountain Biking, Walking</td>
</tr>
<tr class="searchGridAltRow" style="line-height: 14px; text-align: left;">
<td><div style="text-align: center;">
<img alt="Trail has spatial data" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><div style="text-align: center;">
<img alt="Trail is a rail-trail" src="http://www.traillink.com/images/spatial_indicator.gif" style="border-width: 0px;" /></div>
</td>
<td><a href="http://www.traillink.com/trail/iron-horse-state-park.aspx" style="color: blue;">Iron Horse State Park</a></td>
<td>WA</td>
<td>King, Kittitas</td>
<td>82</td>
<td>Fishing, Horseback Riding, Mountain Biking, Walking, Cross Country Skiing</td>
</tr>
</tbody></table>
<br />
<br />
More info here at <a href="http://traillink.com/">TrailLink.com</a>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-89606099325140876552012-06-08T09:44:00.001-07:002012-06-08T09:53:38.572-07:00Northrock XC29 Bicycle from Costco<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<br />
<div id="code_snippet" style="background: white; color: black; overflow: scroll;">
<a href="http://www.jordanpeterson.me/book/northrock-xc29-bicycle-costco" target="_blank">Review by Jordan Peterson</a><p />
Additional reviews/feedback found <a href="http://forums.mtbr.com/29er-bikes/costco-29er-790732-2.html" target="_blank">HERE</a><p />
<img alt="" src="http://www.jordanpeterson.me/sites/default/files/user1/images/Bicycles/XC29/IMG_0613_486x316.JPG" style="border: 1px solid currentColor; float: right; height: 316px; margin: 10px; outline: 0px; width: 486px;" />
After dabbling around with 3 Northrock bicycles in Costco, we left with both the Northrock XC29 and the Northrock FC7.<p />
The models Costco currently sells are the following:
<ul style="margin: 1em 0px; padding: 0px 0px 0.25em 2.5em;">
<li>XC29 for $480</li>
<li>XC6 for $350</li>
<li>SC7 for $300</li>
</ul>
My girlfriend and I were riding down the aisles, testing for which bicycle had the fit and comfort. She was looking for a 20+ year old Schwinn bicycle replacement; back when Schwinn was quality, and HEAVY too! I was looking to replace a six year old Mongoose full suspense bike that seemed to never fit, and was a bit on the heavy side.<p />
<img alt="" src="http://www.jordanpeterson.me/sites/default/files/user1/images/Bicycles/XC29/IMG_0615_100x137.JPG" style="border: 1px solid currentColor; float: left; height: 137px; margin: 10px; outline: 0px; width: 100px;" />
I was liking the XC6 for the price, but it didn't fit my 6'0" height well; seemed crunched up, or maybe the handle bars design is set low. I liked the XC29's stanse; tall. The XC29 seemed to enable better balance, less peddling effort, and qute possibly, the frame fits, but the price didn't! So I dabbled around looking for something more to justify another $130 for "the better bike".<p />
After riding the XC29 down the street and off road, I noticed it liked to skip a gear, and sometimes jump a gear at random. I did, however, find a good tutorial on how to properly adjust limits for the <a class="ext" href="http://www.parktool.com/blog/repair-help/front-derailleur-adjustments" style="color: #164e88; text-decoration: underline;" target="_blank">front</a><span class="ext" style="background-image: url("http://www.jordanpeterson.me/sites/all/modules/extlink/extlink.png"); background-position: 100% 50%; background-repeat: no-repeat no-repeat; padding-right: 12px;"></span> and <a class="ext" href="http://www.parktool.com/blog/repair-help/rear-derailler-adjustments-derailleur" style="color: #164e88; text-decoration: underline;" target="_blank">rear derailleurs</a><span class="ext" style="background-image: url("http://www.jordanpeterson.me/sites/all/modules/extlink/extlink.png"); background-position: 100% 50%; background-repeat: no-repeat no-repeat; padding-right: 12px;"></span>. After getting a better understanding of how derailleurs work, a little tuning made this gem a pleasure.<p />
The disc brake rotors look undersized for the 29 inch wheels, but brake skidding the rear tire comes effortlessly. Ball berring calipers sound like a good idea. I don't know much about them, but I'm guessing they use bearings on the lever arm shaft instead of a nylon or bronze surface? Not sure.<p />
The seat is terribly uncomfortable. One easy flat trail ride and I was done trying to be tough.<p />
The 29 inch wheels are awesome for smoother ride; more tire on the ground, better tracking, and better balance. However, if you're planning to put this in your vehicle, first consider if it'll fit!! I had forgotten the conviences of smaller mountain bikes.<p />
This frame seems to be built tough; welds are dimed, and the steering neck is at a comfortable level. I like being able to sit up more instead of bent over; this is what sold the bike!<p />
After assembly from the box, you'll have to adjust things to your liking. I adjusted the handlebars, brake levers, and shifters 5 times before I was happy. <p />
Don't bother looking for the right alan wrench size, as a couple of alan wrenches and a combo open end wrench came with the bike. I'm glad they did, as I was busy at getting everything just right.<p />
<div style="background-color: #dddddd; border: 1px solid rgb(170, 170, 170); float: left; margin: 5px; padding: 5px; position: relative; width: 200px;">
<strong>Resources</strong><ul style="margin: 1em 0px; padding: 0px 0px 0.25em 2.5em;">
<li><a class="ext" href="http://www.parktool.com/blog/repair-help/front-derailleur-adjustments" style="color: #164e88; text-decoration: underline;" target="_blank">Front Derailleur Tuning</a><span class="ext" style="background-image: url("http://www.jordanpeterson.me/sites/all/modules/extlink/extlink.png"); background-position: 100% 50%; background-repeat: no-repeat no-repeat; padding-right: 12px;"></span></li>
<li><a class="ext" href="http://www.parktool.com/blog/repair-help/rear-derailler-adjustments-derailleur" style="color: #164e88; text-decoration: underline;" target="_blank">Rear Deraileur Tuning</a><span class="ext" style="background-image: url("http://www.jordanpeterson.me/sites/all/modules/extlink/extlink.png"); background-position: 100% 50%; background-repeat: no-repeat no-repeat; padding-right: 12px;"></span></li>
</ul>
</div>
Being that Northrock is made in China, I probably wouldn't have botten it at Walmart, but since Costco doesn't "usually" sell junk, and their return policy is fair, I have no stick yet to shake at them. The sister product, a Northrock SC7 is an amazing bike for the price; many are so happy with the bike, while some others complain that the derailleurs should have been adjusted. The bike does clearly have a sticker on it that says "Made in China". What do they expect? Look it over; have a bicycle mechanic look at it before you buy it. Most things in China are slammed out of production with slim quality assurance, but with Northrock, seems they're attempting say quality.<p />
With time I will give a better account of this purchase and how well the bike holds up. So far I've been pleased with the comfort and am looking forward to riding it more daily.
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-64163865790516248332012-06-08T09:30:00.000-07:002012-06-08T09:31:28.007-07:00Front Derailleur Adjustments<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<br />
<div id="code_snippet" style="background: white; color: black; overflow: scroll;">
<div class="content" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border: 0px currentColor; color: black; font-size-adjust: none; font-stretch: normal; font: 9px/13px Arial, Helvetica, sans-serif; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Useful Tools and Supplies</h3>
<ul>
<li><a href="http://www.parktool.com/category/repair-stands" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Repair Stand</a>, holds bike secure for easy work.</li>
<li><a href="http://www.parktool.com/category/hex-wrenches" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Hex wrenches</a><span class="Apple-converted-space"> </span>as needed.</li>
<li>Screwdriver (#2 Phillips or straight blade)</li>
<li>Light liquid lubricant</li>
<li>Derailleur cable inner wire and housing as needed</li>
<li>Caliper or metric ruler</li>
<li>Cable end caps and housing end caps as needed</li>
<li>Rags</li>
</ul>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
This article will discuss the basic adjustment of the front derailleur. See also related articles:</div>
<ul style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin: 0px 1.5em 1.5em; padding: 0px; vertical-align: baseline;">
<li><a href="http://www.parktool.com/blog/repair-help/rear-derailler-adjustments-derailleur" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Rear derailleur- limit screws and index settings</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/cutting-cable-housing" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Wire cable-sizing and cutting inner wire cable and housing (gear and brake)</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/shift-levers-shifters" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Brake and Shift levers</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/rear-derailleur-overhaul" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Rear derailleur- overhaul</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/rear-derailleur-hanger-alignment" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Rear derailleur- bent hanger</a></li>
</ul>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
This article assumes the derailleur is compatible with the shifting system and is not extremely worn out. Cable and housing length is not covered in the article, see<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/blog/repair-help/housing-length" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">How do I cut cable and housing and how long should housing be?</a></div>
<h4 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.2em; font-style: inherit; font-weight: normal; line-height: 1.25; margin: 0px 0px 1.25em; padding: 0px; vertical-align: baseline;">
Service Procedures</h4>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The front derailleur simply shoves the chain off one front chain ring and onto another ring. The cage surrounding the chain is pulled in one direction by the inner wire. A spring in the derailleur returns the cage to the other direction when the inner wire is relaxed. A properly adjusted front derailleur should shift the chain between the front chainrings but will not throw the chain off the rings. The basic adjustments for the front derailleur are the height, rotation, limit screws and inner wire tension (index setting).</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
It is generally a good idea to lubricate the pivot point of the front derailleur with a light lubricant. The cable inner wires should also be lubricated. If you have loosen the inner wire pinch bolt, lubricate those threads as well. When tightening this pinch bolt, secure to approximately 30-40 inch-pounds. This is about 10 pounds of effort hold a wrench 3 inches from the bolt.</div>
<h4 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.2em; font-style: inherit; font-weight: normal; line-height: 1.25; margin: 0px 0px 1.25em; padding: 0px; vertical-align: baseline;">
Front Derailleur Height</h4>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Before checking limit screw adjustments, check the derailleur positioning. If the derailleur cage is too far above the large chainring, it is more likely to shift poorly. If the derailleur is too low, it may scrape against the chainrings or jam the chain when shifting.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Some front derailleur models do not have height or rotation adjustments. These models mount on a plate and both height and rotation settings are pre-set. Additionally, some bikes have a bracket commonly referred to as a "braze-on" for front derailleur mounting. This bracket will allow limited height and rotational settings.</div>
<ol>
<li>Inspect height alignment of front derailleur. The outer cage plate must be positioned over the largest chainring when viewing height. Simply grab the exposed front derailleur inner wire until outer cage plate is directly over outer chainring teeth. Use care to not shift the derailleur cage past this point. Note height and direction of change needed. It is then necessary to relax the cable to loosen the mounting bolt and raise or lower the height as needed.</li>
<li>The gap between the teeth of the outer chainring and lower edge of the outer cage plate should be 1-2mm, about the thickness of a penny. Using a penny or a dime as a feeler gauge, fit it between the chainring teeth and the cage plate. It should just fit between the teeth and plate.<span class="Apple-converted-space"> </span>
<img alt="" height="263" src="http://www.parktool.com/uploads/images/blog/repair_help/ft_der_2.jpg" width="350" /></li>
<li>To lower cage, release inner wire tension completely by shifting to innermost chainring. Note angle of outer cage plate relative to chainring.</li>
<li>Front derailleur clamps typically leave a mark on the frame, which is useful as a reference when changing height. Loosen derailleur clamp bolt, change derailleur height, and return cage to same rotation relative to chainring. Tighten clamp bolt. Move outer cage plate over outer chainring, and check height again. Repeat this process until cage plate height is 1-2mm above outer chainring.</li>
</ol>
<h4 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.2em; font-style: inherit; font-weight: normal; line-height: 1.25; margin: 0px 0px 1.25em; padding: 0px; vertical-align: baseline;">
Front Derailleur Rotational Angle</h4>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The front derailleur cage should be approximately parallel to the chain. If the derailleur cage is rotated too far from this position, it will shift poorly. If the derailleur mount is a clamp type, its rotation can be changed. Generally, the outer cage of the front derailleur should be aligned to the chain. The middle image below shows adequate alignment.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" height="354" src="http://www.parktool.com/uploads/images/blog/repair_help/ft_der_8.jpg" width="418" /></div>
<ol>
<li>Shift chain to outermost chainring and outermost rear sprocket.</li>
<li>Sight chain from directly above chainrings. Consider the chain as representing a straight line. Compare this line to outer derailleur cage plate. Outer cage plate and chain should be parallel. Keeping the cage and chain parallel will minimize the risk of the chain jumping off the outermost ring. If cage is not parallel, there will be a relatively large gap at either the back or the front end of the cage, and the chain may over shift.</li>
<li>If derailleur cage needs to be rotated, note direction of desired rotation.</li>
<li>Release inner wire tension by shifting to the innermost chainring.</li>
<li>Many clamps leave a slight marking on the frame. Use this scarring as a reference when changing height. It is also possible to use a pencil to make two reference marks on the frame, one for height and a second, vertical mark, to reference rotation. Use the marks to avoid inadvertently changing height.</li>
<li>Loosen clamp bolt and slightly rotate in correct direction. Use care not to change height. Tighten derailleur clamp bolt.</li>
<li>Shift to outer chainring and observe rotation alignment. Repeat adjustment if necessary.</li>
</ol>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
NOTE: Some front derailleur models do not have height or rotation adjustments. These models mount on a plate and both height and rotation settings are pre-set. Additionally, some bikes have a bracket commonly referred to as a "braze-on" for front derailleur mounting. This bracket will allow limited height and rotational settings.</div>
<h4 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.2em; font-style: inherit; font-weight: normal; line-height: 1.25; margin: 0px 0px 1.25em; padding: 0px; vertical-align: baseline;">
Front Derailleur Limit Screw Settings</h4>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Limit screws stop the inward and outward travel of the front derailleur cage. Limit screws are marked "L" and "H". The L-screw will stop the motion of the derailleur toward the smallest chainring. The H-screw will stop the motion of the derailleur toward the largest chainring.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
If the limit screws lack any marking, you will need to determine which are the "H" and "L" by testing. Begin with the chain on the smallest cog. Relax the cable tension completely using the cable barrel adjuster. Place a hand on the derailleur body to feel for any lateral motion, and select one screw to turn one full turn clockwise and then counter-clockwise. If you felt motion in the derailleur, this is the "L" screw. If there was no motion, do the same test with the other limit screw. You should consider marking the "L" screw permanently. The other screw by default is the "H" screw.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Although the limit screws will stop the derailleur, it is the inner wire and derailleur spring that make the derailleur move. If the inner wire has too much tension, the derailleur will not rest on the L-screw stop. If the inner wire tension were to change, the derailleur inner limit would also change, possibly causing the chain to fall off the rings.</div>
<h4 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.2em; font-style: inherit; font-weight: normal; line-height: 1.25; margin: 0px 0px 1.25em; padding: 0px; vertical-align: baseline;">
Front Derailleur - Adjusting L-screw</h4>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The L-screw controls the inward most travel of the front derailleur. Set adequately, it allows the chain to shift to the smallest ring, but not beyond so it falls off.</div>
<ol>
<li>Shift chain to innermost rear sprocket and innermost front chainring. Inspect derailleur for marking indicating "L" screw.</li>
<li>Check inner wire tension. It should be fairly loose at this time. If inner wire is taut, turn barrel adjuster clockwise into housing. The barrel adjuster is typically located where the cable housing enters the shift lever. If barrel adjuster is already fully turned into housing, loosen inner wire pinch bolt, slacken inner wire and retighten bolt.</li>
<li>Sight gap between inner chain plate and inner cage plate. Only a small gap should be visible, about 1/16" or 1mm, about the thickness of a dime.<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" height="295" src="http://www.parktool.com/uploads/images/blog/repair_help/ft_der_11.jpg" width="124" /></div>
</li>
<li>Pedal bike slowly and continue to sight gap. Set clearance at tightest point in chainring rotation. Adjust L-screw so there is a small gap between inner cage and inner chain plate. Pedal bike and check that chain is not rubbing cage as chainrings turn.<blockquote style="border: 0px currentColor; color: #666666; font-family: inherit; font-size: 9px; font-style: italic; font-weight: inherit; margin: 1.5em; padding: 0px; vertical-align: baseline;">
<span class="Apple-converted-space"> </span>1. If there is no gap and chain is rubbing cage, loosen L-limit screw 1/8 turn (counter-clockwise). Inspect for gap again and repeat until slight gap appears. 2. If the gap appears larger than 1mm at its widest point, tighten the L-screw, in small increments, until the gap closes.</blockquote>
</li>
<li>Test the shift by shifting chain to next chainring then shift back to the innermost ring. Do not use the shift lever. Pull on the inner wire to shift the derailleur. Using the lever may confuse limit screw issues with cable tension issues. If chain shifts quickly, limit screw setting is adequate.</li>
<li>If the shifting appears is slow (requires more than one pedal revolution to initiate shift), turn L-limit counter-clockwise 1/8 turn and repeat test. Repeat 1/8-turn increments until shifting is adequate. The gap will open wider than the 1mm target, but will still be as small as possible with adequate shifting.</li>
<li>If chain is shifting beyond the inner ring and falls off the chainring, gap may be too large or cage alignment may be off. Tighten L-screw 1/8 turn and check shift again. If chain ends up rubbing inner cage of derailleur, yet still drops off inner ring when shifting, other problems such as chain line or derailleur rotation exist.</li>
</ol>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Front Derailleur- Adjusting H-screw</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The outward travel of the front derailleur is stopped by the H-screw. When viewing the H-limit adjustment, make sure there is enough tension on the inner wire by either keeping extra pressure on the lever, or by pulling the exposed inner wire taut by hand. Use a rag to protect your hand if pulling the inner wire. After the H-screw is adjusted the inner wire should be re-tensioned to assure proper shifting.</div>
<ol>
<li>Shift to outermost sprocket in rear and outermost front chainring. Inspect derailleur for mark indicating H-screw.</li>
<li>Pull inner wire with hand to increase tension to insure derailleur is against H-screw.</li>
<li>Maintain full pressure on inner wire and check gap between chain and outer cage plate. Only a small gap should be visible, about 1/16" or 1mm. Pedal bike slowly and continue to sight gap. Set clearance at tightest point in chainring rotation.
<img alt="" height="295" src="http://www.parktool.com/uploads/images/blog/repair_help/ft_der_15.jpg" width="151" /><blockquote style="border: 0px currentColor; color: #666666; font-family: inherit; font-size: 9px; font-style: italic; font-weight: inherit; margin: 1.5em; padding: 0px; vertical-align: baseline;">
<span class="Apple-converted-space"> </span>A. If chain is rubbing cage, loosen H-screw 1/8 turn and pull fully on inner wire. Check gap again.
B. If chain is not rubbing, tighten H-screw repeatedly until chain is 1mm</blockquote>
</li>
<li>Test shift to the large ring. Shift derailleur from next to largest to largest ring using hand pressure on inner wire rather than shift lever. If shifting is slow, loosen H-limit screw slightly and repeat test. If chain shifts off the outside of the large chainring, the outer-limit is set too loose. Tighten H-screw limit and test shift again.</li>
</ol>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Front Derailleur- Adjusting Indexing (Three Chainring Bikes)</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Some front derailleur systems have an index setting. If the shift lever has three distinctive stops or clicks, it is indexing. If the front shift lever is friction, there is no index setting. If the front shift lever has multiple clicks, such as some twist grip style shifters, it is shifted similar to friction levers. Set indexing only after completing all adjustment above.</div>
<ol>
<li>Shift chain to middle chainring in the front and innermost rear sprocket.</li>
<li>View gap between inner cage plate and chain. Gap should be as small as possible without rubbing chain.<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" height="295" src="http://www.parktool.com/uploads/images/blog/repair_help/ft_der_6.jpg" width="136" /></div>
</li>
<li>To reduce gap, increase inner wire tension by turning barrel adjuster counter-clockwise. Adjusting barrel may be on frame or on shift lever. Check gap again.</li>
<li>If chain is rubbing cage, turn barrel adjuster clockwise, or inward toward shifter body.</li>
<li>If barrel adjuster is all the way in or out there will be no adjustment possible. In these cases reset the barrel. Shift to innermost chainring and loosen inner wire pinch bolt. Turn the barrel fully clockwise and back out about 2 full turns. Pull wire gently with<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/product/cable-stretcher" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">fourth-hand tool<span class="Apple-converted-space"> </span></a>and tighten pinch bolt. Begin adjustment of inner wire tension as above.<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" height="127" src="http://www.parktool.com/uploads/images/blog/repair_help/BT_2use.jpg" width="200" /></div>
</li>
<li>Test shift of front derailleur to all three front chain rings. If the derailleur rubs in the largest front chainring, double check H-limit screw and inner wire tension, which may be too loose. If chain is slow to shift to smallest chainring, double check L-limit screw and inner wire tension, which may be too tight.</li>
</ol>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Front Derailleur- Adjusting Indexing (Two Chainring Bikes)</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Some front derailleur systems have an index setting. If the shift lever has two distinctive stops or clicks, it is indexing. If the front shift lever is friction, there is no index setting. NOTE: Some bike uses an "in-line" barrel adjuster to change housing length and set the indexing.</div>
<ol>
<li>Shift chain to outer chain ring in the front and outermost rear cog.</li>
<li>View gap between outer cage plate and chain.</li>
<li>If outer cage plate clears chain, index setting is adequate.</li>
<li>If plate is rubbing chain, increase inner wire tension by turning adjusting barrel counter-clockwise and check again.</li>
<li>If barrel adjuster is all the way in or out there will be no adjustment possible. In these cases reset the barrel. Shift to innermost chainring and loosen inner wire pinch bolt. Turn the barrel fully clockwise and back out about 2 full turns. Pull wire gently with<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/product/cable-stretcher" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">fourth-hand tool<span class="Apple-converted-space"> </span></a>and tighten pinch bolt. Begin adjustment of inner wire tension as above.</li>
<li>Test shift of front derailleur to both front chainrings.</li>
</ol>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Front Derailleur Performance</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The front derailleur should shift the chain between chainrings without throwing the chain off the extreme outer and inner rings. It is possible that the front derailleur will rub the chain slightly even on properly adjusted bikes. This is likely on some bikes when riding in the largest sprocket in front and the smallest cog in back. As the bike is pedaled with force the frame flexes and moves the chainrings side to side, which cause an intermittent rubbing noise. Loosening the H-limit would move the front cage out more, and may stop the rubbing, but it may also cause the chain to shift over the largest ring and come off. If all aspects of front derailleur adjustments are correct on this bike, the rider is simply exceeding the engineering and design capabilities of the machine.</div>
</div>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-62566521570323793022012-06-08T09:26:00.000-07:002012-06-08T09:30:59.330-07:00Rear Derailler Adjustments (derailleur)<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<br />
<div id="code_snippet" style="background: white; color: black; overflow: scroll;">
<div class="content" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border: 0px currentColor; color: black; font-size-adjust: none; font-stretch: normal; font: 9px/13px Arial, Helvetica, sans-serif; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Typical Tools and Supplies Needed:</div>
<ul>
<li>Repair Stand, <a href="http://www.parktool.com/category/repair-stands" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border: 0px currentColor; color: #0077c0; font-size-adjust: none; font-stretch: normal; font: 9px/13px Arial, Helvetica, sans-serif; letter-spacing: normal; margin: 0px; orphans: 2; padding: 0px; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">PRS and PCS stands</a>.</li>
<li>Screwdriver, Phillips #2 or straight blade</li>
<li>Hex Wrenches, if changing inner-wire<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/category/hex-wrenches" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">AWS series</a>.</li>
<li>Light lubricant such as<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/product/synthetic-blend-chain-lube-with-ptfe-CL-1" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">CL-1</a></li>
<li>Forth Hand Tool<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/product/cable-stretcher-BT-2" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">BT-2</a></li>
<li>Cable cutter, if trimming cable<span class="Apple-converted-space"> </span><a href="http://www.parktool.com/product/professional-cable-and-housing-cutter-CN-10" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">CN-10</a></li>
<li>Rags</li>
</ul>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The article will discuss the adjustment of the rear derailleur. See also related articles:</div>
<ul>
<li><a href="http://www.parktool.com/blog/repair-help/front-derailleur-adjustments" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Front derailleur- limits screws and index settings</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/housing-length" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Wire cable-sizing and cutting inner wire cable and housing (gear and brake)</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/brake-levers" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Brake and Shift levers</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/rear-derailleur-overhaul" style="border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Rear derailleur- overhaul</a></li>
<li><a href="http://www.parktool.com/blog/repair-help/rear-derailleur-hanger-alignment" style="background-image: none; border: 0px currentColor; color: #0077c0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">Rear derailleur- bent hanger</a></li>
</ul>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Derailleur bicycles have several sprockets on the rear hub. By using different combinations, the rider will find low gears for going up hill and high gears for going down hill. The gear system needs maintenance and adjustment to perform well. The cable system may also need replacement as it wears. The derailleur limit screws and index setting will need periodic checking. This article will first discuss limit screw setting, and then index adjustments.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Derailleur Limit Screws (H-Screw and L-Screw)</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Rear derailleurs "derail" the chain from one sprocket and move it to another. The upper derailleur pulley (called the "guide pulley" or G-pulley) pushes the chain to the next sprocket. A proper gear adjustment aligns the guide pulley under the intended sprocket.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Changes to the inner wire tension causes movement in the derailleur. The derailleur body is fitted with a spring that is pulled tight, or relaxed, by the inner wire. Pulling the inner wire moves the derailleur cage and guide pulley in one direction and tightens the spring. Relaxing inner wire tension allows the spring to move the body and pulley in the opposite direction.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
It is normal for a chain to make some noise during a shift. The shift may appear subjectively "noisy," "loud," or "rough". Factors like the type of chain or sprocket, the wear on each, and the amount and type of lubrication will affect the noise a chain makes during shifting. The limit screws typically can do nothing to affect the noise during a shift between cogs. Noise from the chain as it rides on the sprocket is, however, a useful symptom. There is for any given bike a "base level" of noise from the chain as it passes over the sprocket teeth. When the derailleur jockey wheel is out of alignment, the chain may make excessive noise. To demonstrate the "base level" noise, shift the bike to the second sprocket by pulling the inner wire. Continue to pedal and move the inner wire slightly to hear changes in the level of noise. The quietest level of noise may be considered the base level for that bike.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Derailleur pulleys are limited in both inward and outward motions by using the derailleur limit screws. Properly set, the derailleur will shift to both the extreme outward sprocket (the smallest in size) and the extreme innermost sprocket (the largest in size). The limit screws do not control the derailleur on the sprockets between the two extremes. These are set using the barrel adjuster and tension on the inner wire. The limit screws are usually marked "H" and "L". The "H" controls the outer most limit of the derailleur, and the "L" controls the inner most limit.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" src="http://www.parktool.com/uploads/images/blog/repair_help/der_parts.gif" /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Using the shift lever to adjust limit screws can cause confusion and problems because it tends to focus attention on the inner wire tension (indexing) rather than limit screw settings. Instead of using the shift lever, pull the inner wire with one hand to simulate shift lever action. This will help eliminate confusion between indexing problems and limit screw problems. With the bike in a stand, practice shifting with this method before adjusting the limit screws.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" src="http://www.parktool.com/uploads/images/blog/repair_help/der_cablepull.jpg" /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Turning the limit screws adjusts the limit of travel of the pulleys. Tightening restricts the travel, while loosening allows more travel. The purpose of the following procedure is to find the tightest H-limit screw setting that will allow a good shift to the outermost cog, and the tightest L-screw setting that will allow a good shift to the innermost cog. The location of limit screws on the derailleur body may vary between manufacturers. Always look for the "H" and "L" marked adjacent to the screws.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
H-Limit Screw</h3>
<ul>
<li>Shift chain to outermost (largest) chainring. Shift chain to outermost rear sprocket (smallest sprocket).</li>
<li>Check tension on rear inner wire. If inner wire appears to have any tension, it may interfere with the H-screw setting. Turn adjusting-barrel clockwise to eliminate inner wire tension. Proper cable tension (indexing) will be adjusted later.</li>
<li>Pedal bike at a quick cadence, approximately 60 rpm or more.</li>
<li>Pull inner wire to shift derailleur one sprocket inward. Adjust pull on inner wire until chain rides quietly on second sprocket. Release inner wire quickly to shift back to outermost sprocket and note shift. When adjusting the H-screw, be concerned with two situations:<ol type="1">
<li>The outward shift from the second sprocket to the outermost sprocket.</li>
<li>How the chain rides on the outermost sprocket.</li>
<li>Do not be concerned with how the chain rides when it is held on the second sprocket.</li>
<li>If the shift outward seems acceptable, tighten H-screw 1/4 turn clockwise and repeat shift. Even if shift appears acceptable, continue tightening H-screw by 1/4 turn increments and checking shift until shifting is slow or hesitant. Another symptom of a too tight H-limit screw is when the chain is on the smallest cog but makes a rattle from rubbing the second sprocket inward. View this last symptom by looking under the rear sprockets where the chain meets the sprockets. The inner plate of the chain will rub against the next sprocket inward making the noise.</li>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" src="http://www.parktool.com/uploads/images/blog/repair_help/der_hlimit.gif" /></div>
<li>When symptoms of a too tight H-screw appear, loosen H-screw 1/4 turn and check shift again. Repeat process of shifting and correcting by 1/4 turn increments. When too tight symptoms disappear, H-screw is at tightest acceptable setting, and limit screw setting is done.</li>
</ol>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
NOTE: "Rapid Rise" or "Low-Normal" derailleurs use a reverse spring application. When the inner wire tension is completely relaxed, the derailleur sits on the inner most sprocket, which is reversed from other common derailleurs. When adjusting the H-limit screw, it is necessary to pull the inner wire until the chain is in the second to outermost sprocket then pull hard to shift to the outermost sprocket. The same concept is used to adjust the Shimano® "Rapid-Rise" or "Low-Normal" derailleurs. You want the tightest limit screw setting that allows good shifting to the extreme outer and inner cogs.</div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
L-Limit Screw</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The L-limit stops the derailleur from moving inward (toward the spokes). The limit screw does not make the derailleur move, pulling the inner wire makes the derailleur move. The L-screw allows the pulley wheels to shift the chain to the innermost sprocket and yet not shift off the sprocket into the spokes.</div>
<ol>
<li>Shift bike to middle chainring (or smaller ring of double chainring bikes) and to second-to-innermost rear sprocket.</li>
<li>Pedal bike at a quick cadence, approximately 60 rpm or more.</li>
<li>Pull inner wire by hand to shift derailleur sprocket inward. When adjusting the L-screw, be concerned with two situations:<ol>
<li>The inward shift from the second-to-innermost sprocket to the innermost sprocket.</li>
<li>How the chain rides on the innermost sprocket.</li>
<li>If shifting seems adequate, tighten L-screw 1/4 turn, and repeat shift. Continue to tighten L-screw until symptoms of too tight appear. These symptoms are that the chain will not complete shift even with pressure on inner wire, the chain hesitates before shifting inward even with constant pressure on inner wire, or the chain rattles excessively when riding on innermost sprocket<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="" src="http://www.parktool.com/uploads/images/blog/repair_help/der_llimit.gif" /></div>
</li>
<li>When symptoms of a too tight L-screw appear, loosen L-screw 1/4 turn and check shift again. Repeat process of shifting and correcting by 1/4 turns. When too tight symptoms disappear, L-screw is at tightest acceptable setting, and limit screw setting is done.</li>
</ol>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
B-Screw Adjustment</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
After setting the L-screw, check the "B-screw" for an adequate setting. The B-screw controls the derailleur body angle, hence the name, B-screw. Shift to the innermost rear cog, which is the largest cog. View the upper pulley relative to the largest cog. If the pulley is rubbing against this cog, tighten the B-screw to increase upper pivot spring tension, which pulls the pulley back and away from the cog. If there is a large gap between the upper pulley and cog, loosen the screw. To find a good setting, loosen the B-screw until the upper pulley begins to rub, then tighten the screw to get clearance.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="Watch pulley against cog" height="247" src="http://www.parktool.com/uploads/images/blog/repair_help/der04.jpg" width="300" /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="Adjusting B-screw" height="225" src="http://www.parktool.com/uploads/images/blog/repair_help/der01.jpg" width="300" /></div>
<i>Check for rubbing of largest sprocket and upper pulley</i><div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="Higer tension in upper pivot" height="239" src="http://www.parktool.com/uploads/images/blog/repair_help/der117.jpg" width="400" /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="Low tension setting in upper pivot" height="239" src="http://www.parktool.com/uploads/images/blog/repair_help/der114.jpg" width="276" /></div>
<i>Change B-screw as necessary</i><div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<b>Campagnolo®</b>
Some Campagnolo® model derailleurs have a body tension adjustment at the pulley cage, not at the upper pivot. The screw is basically a "rack and pinonquot; system. The cage spring plate rotates to increase or decrease tension. The upper pivot and lower cage pivot springs oppose one another. In this system, the upper spring is fixed. Increasing cage tension (turning screw clockwise) will bring the upper pulley closer to the cog. Decreasing cage tension (turning screw counter-clockwise) will increase the distane between upper pulley and cog.</div>
<img alt="Campagnolo body angle screw" height="250" src="http://www.parktool.com/uploads/images/blog/repair_help/campy56.jpg" width="300" /><div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<b>SRAM® Derailleurs</b>
Sram® designates a 6mm between the largest rear cog and the upper pulley. Use a 6mm hex wrench to help estimate this gap.</div>
<b>NOTE:</b><span class="Apple-converted-space"> </span>Shimano "Rapid rise" or "Low-Normal" Shimano® reverse the spring pull from conventional derailleurs. The derailleur moves inward (toward the spokes) when the cable tension in relaxed, or or "normal" position. To adjust L-screw, pull on inner wire and shift outward one sprocket, then release inner wire to shift inward. Tighten L-screw until shifting is slow, then turn counter-clockwise 1/4 turn until good shifting is restored.<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The process above sets the limits to the tightest setting that still shifts well. This allows the derailleur to wear with use and time, and yet still allow a good setting. After limit screws are set, proceed to index adjustments.</div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Checking the Rear Indexing Adjustment</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
The rear indexing adjustment should only be done after the H-limit and L-limit screws are adjusted. The rear derailleur indexing is adjusted by changing the inner wire tension. For the common rear derailleurs, increasing inner wire tension tends to move the rear derailleur more to the left, or toward the spokes. Less inner wire tension tends to move the derailleur to the right. The inner wire tension will not stop the derailleur at its extreme limits. The H-limit screw stops the derailleur at its right most setting, and the L-limit screw stops the derailleur at its left most setting.
(Shimano® "Rapid rise" or "Low-Normal" derailleur are a bit different. These place the chain under the inner most sprocket when there is no cable tension. See procedures at the bottom of article.)</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Modern indexing shift levers use dwell, which is a hesitation between movements in the lever. These hesitations are timed to match the movements of the derailleur and the spacing in the rear sprockets. The design of some derailleur and shift lever brands requires more of a push (or twist) of the lever to complete the shift. The amount of extra push or twist is not consistent between manufacturers and each rider must learn the particular attributes of his or her system.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Changes to inner wire tension are made at the adjusting barrel. Adjusting barrels may be located either at the rear derailleur or at the shift lever. The goal of adjusting the indexing is to find the tightest inner wire tension setting that will allow good shifting to the gears normally used. This will allow the longest lasting indexing adjustment as the system wears and the cable system stretches with use. To find the tightest inner wire setting, you will purposely make the setting too tight then relax tension slightly. There are two basic symptoms for a "too tight" inner wire. These are a rattling noise from the chain rubbing against the next cog inward, and a slow or hesitant outward shift. These are symptoms for rear derailleurs that sit outward when inner wire tension is released.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<strong style="font-weight: bold;">NOTE:</strong><span class="Apple-converted-space"> </span>If the cable inner wire is not correctly routed into the derailleur pinch bolt, a good indexing setting may not be possible. The wire should leave the barrel adjuster and travel straight to the pinch mechanism. The upper image is correctly routed, while the lower image shows incorrect routing.</div>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<img alt="Wire routing at derailleur" height="475" src="http://www.parktool.com/uploads/images/blog/repair_help/der101.jpg" width="358" /></div>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Index Setting</h3>
<ol>
<li>Set limit screws (if not already done).</li>
<li>Shift chain to outermost rear sprocket (smallest). Shift chain to outermost (largest) chainring in front.</li>
<li>Test initial inner wire tension. Pedal a normal cadence and shift rear derailleur with one click on lever. Use care to only move lever one position. If derailleur moves one sprocket, tension is adequate.</li>
<li>If derailleur fails to shift one sprocket, inner wire may be too slack. Turn barrel adjuster fully into derailleur body (or shift lever) then turn counter clockwise two turns to allow for index adjustments. Loosen inner wire pinch bolt and gently pull on inner wire with fourth hand tool or pliers to remove slack. Tighten inner wire pinch bolt.</li>
<li>If derailleur will not shift one sprocket after removing slack in "d", return lever back to outermost sprocket position and increase inner wire tension by turning barrel adjuster counter-clockwise 1/4 turn and attempt shift again.</li>
<li>Shift to second sprocket in rear. Pedal and increase inner wire tension by continuing to turn adjusting barrel counter-clockwise until a definite rattling is heard. Rattle is from chain scrapping against next sprocket.</li>
<li>Once a too-tight rattle is achieved, turn barrel adjuster 1/4 turn clockwise, to release inner wire tension, and pedal again. Listen and look for signs of scraping or rattling. Continue turning barrel adjuster 1/4 turn clockwise at a time until rattle disappears.</li>
<li>Shift derailleur one sprocket inward at a time, listening for signs of rattle, indicating a too tight inner wire. Turn adjusting barrel 1/4 turn clockwise to eliminate rattle. Note: Do not attempt shift to largest rear sprocket while in largest front sprocket. This gear is normally not used and adjusting tension to this shift may compromise other commonly used gears.</li>
<li>Shift to innermost (smallest) chainring and check gears again. If no rattling is present, index adjustment is done.</li>
</ol>
<h3 style="border: 0px currentColor; color: black; font-family: inherit; font-size: 1.4em; font-style: inherit; font-weight: normal; line-height: 1; margin: 0px 0px 6px; padding: 0px; vertical-align: baseline;">
Shimano "Rapid Rise" or "Low-Normal" Derailleur Indexing Adjustment</h3>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
Shimano "rapid rise" or "Low-Normal" derailleurs use a return spring that puts the derailleur under the innermost rear sprocket when the inner wire tension is released. As with other indexing derailleurs, the inner wire tension should be set as tight as possible with good shifting. However, the symptoms of a too-tight setting are different, which for "Low-Normal" systems are when the derailleur shifts outward slowly, or a there is a rattle from the upper pulley being aligned too far outward. Look underneath the rear sprocket at the alignment of the upper pulley when there is a rattle to see if this is the cause.</div>
<ol>
<li>Shift chain to middle ring in front and innermost sprocket in back.</li>
<li>Pedal and shift lever one position.</li>
<li>Pedal and turn barrel adjuster counter-clockwise to tighten inner wire tension until chain begins to shift outward.</li>
<li>Turn barrel adjuster clockwise 1/4 turn until chain runs smoothly on second cog.</li>
<li>Shift outward one sprocket at a time trying each gear. Turn barrel adjuster 1/4 turn clockwise if too tight symptoms occur.</li>
<li>Shift to all other normal gear combinations and test adjustment.</li>
</ol>
<div style="border: 0px currentColor; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin: 0px 0px 1.5em; padding: 0px; vertical-align: baseline;">
<b>
NOTE:</b><span class="Apple-converted-space"> </span>The indexing procedure here assumes that there are no unusual problems, such as bent derailleurs, bent derailleur hangers or excess inner wire friction from dirt in the housing. Additionally, manufacturers design shift levers and drive train components to work within their system. Mixing brands within the drive train may lead to poor shifting. This is referred to as an compatibility problem.</div>
</li>
</ol>
</li>
</ul>
</div>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-71270309576413941012012-05-30T10:30:00.002-07:002012-05-30T10:35:06.730-07:00Stored Procedure Template for Try/Catch with Transaction Handling<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<br />
<div id="code_snippet" style="background: white; color: black; overflow: scroll;">
<br />
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">set</span><span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">nocount</span> <span style="color: blue;">on</span><span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">declare</span><span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> @trancount <span style="color: blue;">int</span> <span style="color: grey;">=</span> <span style="color: magenta;">@@trancount</span><span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">begin</span><span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">try<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">if</span>
@trancount <span style="color: grey;">=</span> 0 <span style="color: blue;">begin</span>
<span style="color: blue;">tran<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">else</span> <span style="color: blue;">save</span> <span style="color: blue;">tran</span>
ScriptSavePoint<span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">[code goes
here]<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">if</span>
@trancount <span style="color: grey;">=</span> 0 <span style="color: blue;">commit</span><span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">end</span><span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">try<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">begin</span><span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">catch<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">declare<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> @error <span style="color: blue;">int</span> <span style="color: grey;">=</span> <span style="color: magenta;">ERROR_NUMBER</span><span style="color: grey;">(),<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> @message <span style="color: blue;">varchar</span><span style="color: grey;">(</span>4000<span style="color: grey;">)</span> <span style="color: grey;">=</span> <span style="color: magenta;">ERROR_MESSAGE</span><span style="color: grey;">(),<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> @xstate <span style="color: blue;">int</span> <span style="color: grey;">=</span> <span style="color: magenta;">XACT_STATE</span><span style="color: grey;">();<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">if </span><span style="color: grey;">(</span> @xstate <span style="color: grey;">=</span> <span style="color: grey;">-</span>1 <span style="color: grey;">)</span> <span style="color: grey;">or</span><span style="color: blue;"> </span><span style="color: grey;">(</span> @xstate <span style="color: grey;">=</span> 1 <span style="color: grey;">and</span> @trancount <span style="color: grey;">=</span> 0 <span style="color: grey;">)</span> <span style="color: blue;">rollback<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">if </span><span style="color: grey;">(</span> @xstate <span style="color: grey;">=</span> 1 <span style="color: grey;">and</span> @trancount <span style="color: grey;">></span> 0
<span style="color: grey;">)</span> <span style="color: blue;">rollback</span>
ScriptSavePoint<span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">raiserror </span><span style="color: grey;">(</span><span style="color: red;">'ERROR: %d : %s'</span><span style="color: grey;">,</span> 16<span style="color: grey;">,</span> 1<span style="color: grey;">,</span> @error<span style="color: grey;">,</span> @message<span style="color: grey;">)</span> <span style="color: grey;">;<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: blue; font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;">end</span><span style="font-family: "Courier New"; font-size: 8.0pt; mso-no-proof: yes;"> <span style="color: blue;">catch</span> <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-56125299760257162272012-05-23T14:49:00.002-07:002012-05-23T14:54:40.572-07:00ParseDateTime.cmd<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<pre id="code_snippet" style="background: white; color: black; overflow: scroll;">
::::::::::::::::::::::::::::::::
:: Parse Date/Time
::
:: Test/Example:
::
:: ParseDateTime.cmd WITHECHO
:: echo date=[%date%] time=[%time%] year=[%year%] month=[%month%] day=[%day%] hour=[%hour%] minute=[%minute%] second=[%second%] hundredth=[%hundredth%]
::
::::::::::::::::::::::::::::::::
@echo off&setlocal
for /f "tokens=1-4 delims=/-. " %%G in ('date /t') do (call :s_fixdate %%G %%H %%I %%J)
goto :s_print_the_date
:s_fixdate
if "%1:~0,1%" gtr "9" shift
for /f "skip=1 tokens=2-4 delims=(-)" %%G in ('echo.^|date') do (set %%G=%1&set %%H=%2&set %%I=%3)
goto :eof
:s_print_the_date
endlocal&(
echo.|date|find "JJ">nul
if errorlevel 1 (
:: English locale
REM echo year:[%yy%] month:[%mm%] day:[%dd%]
set year=%yy%
set month=%mm%
set day=%dd%
) else (
:: German locale
REM echo jahr:[%JJ%] monat:[%MM%] tag:[%TT%]
set year=%JJ%
set month=%MM%
set day=%TT%
)
)
for /f "tokens=1-4 delims=.:, " %%i in ("%time%") do (
set hour=%%i
set minute=%%j
set second=%%k
set hundredth=%%l
)
if %hour% lss 10 set hour=0%hour%
if "%1"=="WITHECHO" echo %year%-%month%-%day% %hour%:%minute%:%second%.%hundredth%
</pre>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-69002785178809952482012-05-23T10:33:00.002-07:002012-05-23T10:33:47.107-07:00Useful MS DOS Commands<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input onclick="copyToClipboard('code_snippet');" type="button" value="Copy" />
<br />
<div id="code_snippet" style="background: white; color: black; overflow: scroll;">
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Create a 15 second delay</b> <span style="font-size: xx-small;">(Win98, WinNT, WinXP)</span>:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">ping -n 15 localhost > NUL
</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
the "localhost" could also be 127.0.0.1, and change the "15" to the number of seconds delay required.</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Get the time down to a 100th of a second</b> <span style="font-size: xx-small;">(WinNT, WinXP)</span>:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=5 delims= " %i in ('echo ^| time ^| find "current" ') do echo %i
</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
if used in a batch file, change the %i to %%i and "echo %i" to something like "set ttn=%%i</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
or, but only in WinXP:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=1 delims= " %i in ('echo.%TIME%') do echo %i</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
or, if you only want to print it directly to the screen and don't need to save it to a variable, use:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">echo %TIME%</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Could also use:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=1-3 delims=: " %i in ('time /t') do echo %i%j%k</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
But have found this last method to be very dependant on the Regional settings of Windows, of which you may or may not have control over and does not have the 100th's.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Got sent the following one from Christoph Sternberg, which works a treat with WinXP, and is a lot easier that the 'for' method:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">echo %time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
which can also be used in a 'set' command, just as well</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">set ttrn=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Get the date in "yyyymmdd" format</b> <span style="font-size: xx-small;">(WinNT, WinXP)</span>:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=2-4 delims=/ " %i in ('date /t') do echo %k%i%j</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
This one does assume the date is displayed as mm/dd/yyyy, with separators of "/" when "date /t" is excuted.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
A little playing after checking the output of "date /t" can soon correct any change.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Have found it to be useful when wanting to produce unique daily filenames for log files.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Got sent the following one from Christoph Sternberg, which works a treat with WinXP, and is a lot easier that the 'for' method:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">echo %date:~6,4%%date:~3,2%%date:~0,2%</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
which can also be used in a 'set' command, just as well</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">set tddt=%date:~6,4%%date:~3,2%%date:~0,2%</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<br /></div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Create a new file, or completely blank an existing</b> <span style="font-size: xx-small;">(Win98, WinNT, WinXP)</span>:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">type NUL>newfile.txt</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
This will create a new file named "newfile.txt" with a 0 byte count, it is completely empty.</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Change a File's Date and Time Stamp to current </b><span style="font-size: xx-small;">(Win98)</span>:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">copy thefilename.txt /B+ ,,/Y</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
and if you need to do a bulk change to a whole directory of gif files:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for %i in ('dir *.gif') do copy %i /B+ ,,/Y</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
which all change the Date/Time stamp of all the files with the extension GIF in the current directory.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Have not tested in WinNT or WinXP yet.</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Create a unique filename use date and time</b> <span style="font-size: xx-small;">(WinNT, WinXP)</span><b>:</b></div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
The following is a short batch file that uses date and time to create a unique filename.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">@echo off
:: file = makenew.bat
::
:: description = this batch file uses current date and time to create a file with a unique filename
::
:: Date Author Change/Update
:: 04-Jun-2005 AGButler Original
::
:: set variables
set tdtd=none
set ttrn=none
:: get the date and time and then into single variable
for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j%%k%%l
set tufn=%tdtd%%ttrn%.txt
:: now create the file
type NUL>%tufn%
:EOF
</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Will have to play a little with "date" line to get the delims and order of the %%i %%j %%k correct. To check just type date on the command line and use ouput to change. Have not tested in Win98.</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Remove or Substitue characters with a variable</b><span class="v8" style="font-size: 10px;">(winXP)</span><b>:</b></div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
It is possible to do some neat functions with DOS scripts. One that is often very useful is Removing or Substituting characters with a variable.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
So you have a variable that may have some thing like the time, that contain ":" collin characters "20:12:34.54", but you want to remove the collins. This can be done relitively easily with the SET command. The following script will load the time into a variable "ttrn", then remove the collins and then remove the period.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=5 delims= " %%i in ('echo.^|time^|find "current" ') do set ttrn=%%i
echo %ttrn%
set ttrn=%ttrn::=%
echo %ttrn%
set ttrn=%ttrn:.=%
echo %ttrn%</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
You basically have the <b>variable</b> the a <b>:</b> then the character to search for the <b>=</b> then the character to subsitute, if none the a deletion occurs.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b><i>variable</i>=%<i>variable</i>:search=</b><i>replace</i><b>%</b></div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
It is also useful, if loading data from a file that may enclosed in quotes, and then just use SET to remove the quotes.</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Dealing with large numbers like disk free bytes for Gigabyte capacity drives, 10,000,000,000</b><span class="v8" style="font-size: 10px;">(winXP)</span><b>:</b></div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
My problem was that when using the "fsutil" command in WinXP, Win2K and Win2K3 to retrieve the capacity and free bytes of disk drives, that were to large to be able to be used in arithmetic commands. The task was to read the capacity and compare to the free remaining and make a call if the free remaining had dropped below a set level.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
The solution was to use a series of SET commands, that could simulate the conversion of Bytes into Gigabytes. OK it is not highly accurate, but it is enough to be able to assess if a drive is 90% free remaining or 2% free remaining or anywhere in between.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
What the follow will do is:
- put the capacity and free bytes of my C: drive into variables.
- cut off the last 6 digits, simulating conversion from Bytes to Megabytes.
- Check to make sure the result has not gone below 1MB, if it has then make it 1MB.
- Calculate the capacity used. This will be a number between 1 and the Total Capacity. The smaller the number the more used, or less free.
- Then make an action based on the limit set.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">:: put the capacity and free bytes of my C: drive into variables from the fsutil command
for /F "tokens=7 delims= " %%i in ('fsutil volume diskfree c:^|find "Total # of free bytes" ') do set ctmp1=%%i
for /F "tokens=6 delims= " %%i in ('fsutil volume diskfree c:^|find "Totel # of bytes" ') do set ctmp2=%%i
:: shorten the strings removing last 6 characters simulating conversion from Bytes to MegaBytes
set ctmp1=%ctmp1:~0,-6%
set ctmp2=%ctmp2:~0,-6%
:: check to ensure that "free bytes" now contains something, if not then make equal to 1
:: the variable will be left as is if it contains anything initially, only changes when nul
if .%ctmp1%==. set ctmp1=1
:: now evaluate using the two variables
:: this will produce a RESULT between 1(plenty of free disk) and the capacity of the drive in MegaBytes(near full)
set /A ctmp3=%ctmp2%/%ctmp1%
:: the following assumes for example a 1GB(1000MB) drive has only 100MB free remaining then = LOW
:: set a dummy result, then make a check
set ctmp4=OK
if %ctmp3% GTR 10 set ctmp4=LOW
:: output the result
echo Your C: Drive remaining capacity = %ctmp4%
</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
It does only produce a simple rough guide, but is effective enough to judge whole percentage changes, which should be able to catch a drive at 10% remaining before it gets to 0%, leaving enough time for some action.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
You can also change the 'set dummy and make a check' lines to be a bit more fail safe by:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">set ctmp4=LOW
if %ctmp3% LSS 10 set ctmp4=OK</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
It can take a little bit of playing with, but is an excellent method of keeping an eye on your drive capacities without the need for any fancy software. It is also highly scalable for what ever drive capacity and limits that need to be set or monitored.</div>
<hr style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;" />
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
<b>Creating and using a variable array in DOS</b><span class="v8" style="font-size: 10px;">(winXP)</span><b>:</b></div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
I searched everywhere without success for a method to produce an array in DOS.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
This solution has proven to be very successful.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
The basics is to use a variable name that has some type of separator, like a period ".", the second half of the variable name can then be substituted with the contents of another variable, following is very a simple example.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">:: set the segment variables
set agbtp.1=A
set agbtp.2=B </pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Notice the period between the 'agbtp' and '1' ?</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Next setup or supply a third variable that will be substituted into the array.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">:: set the segid
set segid=1</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Now put the whole lot in to a FOR-DO to obtain the new variable from the array based on the supplied segid. Note the '^=' in the delims, this allows the search to use the '=' as a separator. The 'find' with the ".variable=" is also necessary to do the correct filtering.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;"> :: calculate the Segment printed variable
<b>for</b> /F "tokens=2 delims=^=" %%i in ('set agbtp.%segid% ^| find ".%segid%=" ') <b>do</b> set psegid=%%i</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
This resulted in the variable 'psegid' now containing 'A'.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
If the variable 'segid' had been loaded with the value '2', then the 'psegid' would then contain 'B'.</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
This may all appear very simplistic, but if there was a problem where you wanted to count from 0 to 255, and on each count, produce the output in HEX (00-FF). Setup an array of:</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">set myhex.0=00
set myhex.1=01
set myhex.2=02
" " " - (repeat from 3 to 252 / 03 to FC)
set myhex.253=FD
set myhex.254=FE
set myhex.255=FF
</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Set up a counting loop.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">set /A cntr=0
set /A scntr=256
:loop</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Then substitute in the variable and output the results.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=2 delims=^=" %%i in ('set myhex.%cntr% ^| find ".%cntr%=" ') do echo %%i</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
Which can be simplified by removal of the 'find' command to be.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">for /F "tokens=2 delims=^=" %%i in ('set myhex.%cntr%') do echo %%i</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
</div>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
And loop until finished.</div>
<pre class="pretc" style="color: #cc0000; font-size: 13px;">set /A cntr=%cntr%+1
if NOT [%scntr%]==[%cntr%] goto loop</pre>
<div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; white-space: normal;">
This technique can be used to read data or configuration from a text file, into an array.</div>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-25676694530615765082012-04-23T11:16:00.001-07:002012-04-23T17:34:54.319-07:00Reign Spring Swing 2012 Champions<div style="overflow:scroll;">
<center>
<a href="http://sphotos.xx.fbcdn.net/hphotos-ash3/s720x720/535426_3766794207380_1202404042_33601281_666551948_n.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://sphotos.xx.fbcdn.net/hphotos-ash3/s720x720/535426_3766794207380_1202404042_33601281_666551948_n.jpg"/></a>
<br />Go Reign!<br />
<a href="http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/s720x720/385680_3766604602640_1202404042_33601249_1391505081_n.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/s720x720/385680_3766604602640_1202404042_33601249_1391505081_n.jpg"/></a>
<br />Loud and proud!<br />
<a href="http://3.bp.blogspot.com/-__FDvb2nj1o/T5Xf1HgLvqI/AAAAAAAAAVQ/lYgFPlUxRJQ/s1600/IMAG1314.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://3.bp.blogspot.com/-__FDvb2nj1o/T5Xf1HgLvqI/AAAAAAAAAVQ/lYgFPlUxRJQ/s400/IMAG1314.jpg"/></a>
<br />Crush it!<br />
<a href="http://3.bp.blogspot.com/-T_yleumrZ-k/T5Xf1VUKT1I/AAAAAAAAAVY/-zSr_5oE09Y/s1600/IMAG1315.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://3.bp.blogspot.com/-T_yleumrZ-k/T5Xf1VUKT1I/AAAAAAAAAVY/-zSr_5oE09Y/s400/IMAG1315.jpg"/></a>
<br />Play hard. Rest harder.<br />
<a href="http://3.bp.blogspot.com/-k-XExjZTFP0/T5Xf1xuECjI/AAAAAAAAAVo/u6Fl07KyWYA/s1600/IMAG1317.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://3.bp.blogspot.com/-k-XExjZTFP0/T5Xf1xuECjI/AAAAAAAAAVo/u6Fl07KyWYA/s400/IMAG1317.jpg"/></a>
<br />Bringin' the heat!!!<br />
<a href="http://2.bp.blogspot.com/-zSQ-iLm9SuE/T5Xf2LuCREI/AAAAAAAAAVw/8rfRMixfhnc/s1600/IMAG1325.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/-zSQ-iLm9SuE/T5Xf2LuCREI/AAAAAAAAAVw/8rfRMixfhnc/s400/IMAG1325.jpg"/></a>
<br />Mixin' it up...<br />
<a href="http://4.bp.blogspot.com/-RS2hJJHR5lY/T5Xf2SynxKI/AAAAAAAAAWA/Agq8E7BUUoA/s1600/IMAG1327.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-RS2hJJHR5lY/T5Xf2SynxKI/AAAAAAAAAWA/Agq8E7BUUoA/s400/IMAG1327.jpg"/></a>
<br />Every play! Everyday!<br />
<a href="http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc7/581075_3769897924971_1202404042_33602952_1398149781_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" src="http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc7/581075_3769897924971_1202404042_33602952_1398149781_n.jpg" /></a>
<br />Game face..."No Fear!"<br />
<a href="http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/383407_3769944486135_1202404042_33603022_734386900_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" src="http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/383407_3769944486135_1202404042_33603022_734386900_n.jpg" /></a>
<br />Battle at Home Plate<br />
</center>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-34367320463651368772012-03-24T22:58:00.000-07:002012-04-23T11:17:25.008-07:00Woodinville Reign '97 (14U) Fastpitch<iframe src="https://www.google.com/calendar/embed?mode=AGENDA&height=600&wkst=2&bgcolor=%23ffffff&src=a1dr25tdjspgkgcfoo4ca2u8lk%40group.calendar.google.com&color=%23182C57&ctz=America%2FLos_Angeles" style=" border:solid 1px #777 " width="800" height="600" frameborder="0" scrolling="no"></iframe>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-59115620488880493972012-03-23T19:40:00.000-07:002012-03-25T00:04:07.357-07:00SQL_VARIANT Value DataType Definition<script type="text/javascript">
function copyToClipboard(s) {
if (window.clipboardData && clipboardData.setData) {
clipboardData.setData('text', document.getElementById(s).innerHTML);
}
}
</script>
<input type="button" value="Copy" onClick="copyToClipboard('code_snippet');"/>
<pre id="code_snippet" style="background:white;color:black;overflow:scroll;">
declare @variants table ( Value sql_variant, ordinal int identity(1,1) primary key clustered )
insert into @variants ( Value ) select convert( bigint, 4 )
insert into @variants ( Value ) select convert( binary(10), '1234567890' )
insert into @variants ( Value ) select convert( char(10), '1234567890' )
insert into @variants ( Value ) select convert( date, '2012-03-21 01:23:45' )
insert into @variants ( Value ) select convert( datetime, '2012-03-21 01:23:45' )
insert into @variants ( Value ) select convert( datetime2(6), '2012-03-21 01:23:45' )
insert into @variants ( Value ) select convert( datetimeoffset, '2012-03-21 01:23:45' )
insert into @variants ( Value ) select convert( decimal(9,3), 3.45 )
insert into @variants ( Value ) select convert( float, 0.12 )
insert into @variants ( Value ) select convert( int, 0 )
insert into @variants ( Value ) select convert( money, 7.89 )
insert into @variants ( Value ) select convert( nchar(10), '1234567890' )
insert into @variants ( Value ) select convert( numeric, 4.56 )
insert into @variants ( Value ) select convert( nvarchar(10), '1234567890' )
insert into @variants ( Value ) select convert( real, 3 )
insert into @variants ( Value ) select convert( smalldatetime, '2012-03-21 01:23:45' )
insert into @variants ( Value ) select convert( smallint, 2 )
insert into @variants ( Value ) select convert( smallmoney, 0.12 )
insert into @variants ( Value ) select convert( time, '01:23:45' )
insert into @variants ( Value ) select convert( tinyint, 1 )
insert into @variants ( Value ) select convert( uniqueidentifier, newid() )
insert into @variants ( Value ) select convert( varbinary(10), '1234567890' )
insert into @variants ( Value ) select convert( varchar(10), 'varchar(10)' )
select
ordinal
--,Value
,convert( sysname, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
,convert( int, SQL_VARIANT_PROPERTY( Value, 'Precision' ) )
,convert( int, SQL_VARIANT_PROPERTY( Value, 'Scale' ) )
,convert( int, SQL_VARIANT_PROPERTY( Value, 'TotalBytes' ) )
,convert( sysname, SQL_VARIANT_PROPERTY( Value, 'Collation' ) )
,convert( int, SQL_VARIANT_PROPERTY( Value, 'MaxLength' ) )
,data_definition =
case
when SQL_VARIANT_PROPERTY(Value,'BaseType') in ('bit', 'tinyint', 'smallint', 'int', 'bigint', 'real', 'smallmoney', 'money','text', 'ntext', 'image', 'date', 'time', 'smalldatetime', 'datetime','timestamp', 'sql_variant', 'xml', 'hierarchyid', 'uniqueidentifier')
then convert( nvarchar, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
when SQL_VARIANT_PROPERTY(Value,'BaseType') in ('numeric', 'decimal')
then convert( nvarchar, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
+ N'(' + convert(nvarchar,SQL_VARIANT_PROPERTY(Value,'Precision'))
+ N',' + convert(nvarchar,SQL_VARIANT_PROPERTY(Value,'Scale'))
+ N')'
when SQL_VARIANT_PROPERTY(Value,'BaseType') in ('float')
then convert( nvarchar, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
+ N'(' + convert(nvarchar,SQL_VARIANT_PROPERTY(Value,'Precision'))
+ N')'
when SQL_VARIANT_PROPERTY(Value,'BaseType') in ('char', 'varchar', 'binary', 'varbinary')
then convert( nvarchar, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
+ N'('
+ case
when convert( int, SQL_VARIANT_PROPERTY(Value,'MaxLength') ) = -1
then 'max'
else convert(nvarchar,SQL_VARIANT_PROPERTY(Value,'MaxLength'))
end
+ N')'
when SQL_VARIANT_PROPERTY(Value,'BaseType') in ('nchar', 'nvarchar')
then convert( nvarchar, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
+ N'('
+ case
when convert( int, SQL_VARIANT_PROPERTY(Value,'MaxLength') ) = -1
then 'max'
else convert(nvarchar,convert(int,SQL_VARIANT_PROPERTY(Value,'MaxLength'))/2)
end
+ N')'
when SQL_VARIANT_PROPERTY(Value,'BaseType') in ('datetime2', 'datetimeoffset')
then convert( nvarchar, SQL_VARIANT_PROPERTY( Value, 'BaseType' ) )
+ case
when convert( int, SQL_VARIANT_PROPERTY(Value,'Scale') ) > 0
then N'(' + convert(nvarchar,SQL_VARIANT_PROPERTY(Value,'Scale')) + N')'
else N'' end
else 'unknown'
end
from @variants
order by ordinal
</pre>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-63596582856985463552012-03-20T11:09:00.000-07:002012-03-20T11:09:36.757-07:00Data Compression: Strategy, Capacity Planning and Best Practices<br />
<a href="http://msdn.microsoft.com/en-us/library/dd894051(v=sql.100).aspx" target="_blank">Link to Article</a><br />
<div id="curversion">
<strong>SQL Server 2008</strong> </div>
<div style="clear: both;">
</div>
<div id="mainSection">
<div id="mainBody">
<div class="Section1" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ns0="http://msdn2.microsoft.com/mtps" xmlns:ns1="http://msdn2.microsoft.com/mtps">
<h1>
<img alt="logo-sql08.gif" id="image001" src="http://i.msdn.microsoft.com/dynimg/IC338885.gif" title="logo-sql08.gif" xmlns="" /> </h1>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
SQL Server Technical Article</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<strong>Writer:</strong> Sanjay Mishra</div>
<div class="MsoNormal">
<strong>Contributors:</strong> Marcel van der Holst, Peter Carlin, Sunil Agarwal</div>
<div class="MsoNormal">
<strong>Technical Reviewer: </strong>Stuart Ozer, Lindsey Allen, Juergen Thomas, Thomas Kejser, Burzin Patel, Prem Mehra, Joseph Sack, Jimmy May, Cameron Gardiner, Mike Ruthruff, Glenn Berry (SQL Server MVP), Paul S Randal (SQLskills.com), David P Smith (ServiceU Corporation)</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<strong>Published: </strong>May 2009</div>
<div class="MsoNormal">
<strong>Applies to:</strong> SQL Server 2008</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<strong>Summary:</strong> The data compression feature in SQL Server 2008 helps compress the data inside a database, and it can help reduce the size of the database. Apart from the space savings, data compression provides another benefit: Because compressed data is stored in fewer pages, queries need to read fewer pages from the disk, thereby improving the performance of I/O intensive workloads. However, extra CPU resources are required on the database server to compress and decompress the data, while data is exchanged with the application. Therefore, it is important to understand the workload characteristics when deciding which tables to compress.</div>
<h1>
<a href="" id="_Toc206299640"></a></h1>
<h1>
Introduction</h1>
<div class="MsoNormal">
The <a href=""></a><a href="http://technet.microsoft.com/en-us/library/cc280449.aspx"><span style="color: #1364c4;">data compression</span></a></a> feature in the Microsoft® SQL Server® 2008 database software can help reduce the size of the database as well as improve the performance of I/O intensive workloads. However, extra CPU resources are required on the database server to compress and decompress the data, while data is exchanged with the application. Therefore, it is important to understand the workload characteristics when deciding which tables to compress. This white paper provides guidance on the following:</div>
<ul>
<li class="MsoNormal">How to decide which tables and indexes to compress</li>
<li class="MsoNormal">How to estimate the resources required to compress a table</li>
<li class="MsoNormal">How to reclaim space released by data compression</li>
<li class="MsoNormal">The performance impacts of data compression on typical workloads</li>
</ul>
<h1>
About Data Compression</h1>
<div class="MsoNormal">
SQL Server 2008 provides two levels of data compression – row compression and page compression. <a href=""></a><a href="http://technet.microsoft.com/en-us/library/cc280576.aspx"><span style="color: #1364c4;">Row compression</span></a></a> helps store data more efficiently in a row by storing fixed-length data types in variable-length storage format. A compressed row uses 4 bits per compressed column to store the length of the data in the column. NULL and 0 values across all data types take no additional space other than these 4 bits.</div>
<div class="MsoNormal">
<a href=""></a><a href="http://technet.microsoft.com/en-us/library/cc280464.aspx"><span style="color: #1364c4;">Page compression</span></a> </a>is a superset of row compression. In addition to storing data efficiently inside a row, page compression optimizes storage of multiple rows in a page, by minimizing the data redundancy. Page compression uses prefix compression and dictionary compression. <a href=""></a><a href="http://blogs.msdn.com/sqlserverstorageengine/archive/2008/01/18/what-is-page-compression.aspx"><span style="color: #1364c4;">Prefix compression</span></a></a> looks for common patterns in the beginning of the column values on a given column across all rows on each page. <a href=""></a><a href="http://blogs.msdn.com/sqlserverstorageengine/archive/2008/01/18/details-on-page-compression-page-dictionary.aspx"><span style="color: #1364c4;">Dictionary compression</span></a></a> looks for exact value matches across all columns and rows on each page. Both dictionary and prefix are type-agnostic and see every column value as a bag of bytes. </div>
<div class="MsoNormal">
For more information about the data compression feature, see <a href=""></a><a href="http://technet.microsoft.com/en-us/library/cc280449.aspx"><span style="color: #1364c4;">SQL Server Books Online</span></a></a>. The <a href=""></a><a href="http://blogs.msdn.com/sqlserverstorageengine/archive/tags/Data%20Compression/default.aspx"><span style="color: #1364c4;">SQL Server Storage Engine blog</span></a></a> is also a great resource for the internals of data compression.</div>
<div class="MsoNormal">
The data compression feature is available in the Enterprise and Developer editions of SQL Server 2008. Databases with compressed tables or indexes cannot be restored, attached, or in any way used on other editions. To determine whether a database is using compression, query the dynamic management view (DMV)sys.dm_db_persisted_sku_features. To determine what is compressed, and how (row or page), query the data_compression_desc column in the catalog view sys.partitions.</div>
<h1>
Deciding What to Compress</h1>
<div class="MsoNormal">
SQL Server 2008 provides great flexibility in how data compression is used. Row and page compression can be configured at the table, index, indexed view, or partition level. Some examples of the flexibility in applying data compression are to:</div>
<ul>
<li class="MsoNormal">Row-compress some tables, page-compress some others, and don’t compress the rest. </li>
<li class="MsoNormal">Page-compress a heap or clustered index, but have no compression on its nonclustered indexes.</li>
<li class="MsoNormal">Row-compress one index, and have no compression on another index.</li>
<li class="MsoNormal">Row-compress some partitions of a table, page-compress some others, and don’t compress the rest.</li>
</ul>
<div class="MsoNormal">
With this flexibility comes the challenge in deciding what to compress. This section provides some guidelines to assist in deciding what to compress. Some of the factors that influence this decision are:</div>
<ul>
<li class="MsoNormal">Estimated space savings</li>
<li class="MsoNormal">Application workload</li>
</ul>
<h2>
Estimated Space Savings</h2>
<div class="MsoNormal">
The stored procedure <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/cc280574.aspx"><span style="color: #1364c4;">sp_estimate_data_compression_savings</span></a></a> estimates the amount of space saved by compressing a table and its indexes. It functions by taking a sample of the data and then compressing it in <strong>tempdb</strong>. Estimate the space savings for the largest tables and indexes in a database, and consider compressing only those tables and indexes that yield significant space savings.</div>
<div class="MsoNormal">
The stored procedure <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/cc280574.aspx"><span style="color: #1364c4;">sp_estimate_data_compression_savings</span></a></a> estimates the space savings one table at a time. This can be wrapped in a script to estimate the space savings for all the tables and indexes in a database – as shown in these two blogs: <a href=""></a><a href="http://sqlblog.com/blogs/paul_nielsen/archive/2008/03/13/whole-database-data-compression-procs.aspx"><span style="color: #1364c4;">Whole Database - Data Compression Procs</span></a></a> and <a href=""></a><a href="http://blogs.msdn.com/saponsqlserver/archive/2008/11/24/procedure-used-for-applying-database-compression-to-microsoft-sap-erp-system.aspx"><span style="color: #1364c4;">Procedure used for applying Database Compression to Microsoft SAP ERP system</span></a></a>. Be aware that estimating data compression savings on an entire database may take a long time in a database with several thousand tables and indexes, such as an SAP ERP database.</div>
<h3>
Data and Data Types</h3>
<div class="MsoNormal">
The amount of space saved by compressing a table depends on the “data” the table contains (after all, it is called “data” compression!). Some data compresses significantly, while some other doesn’t. Tables that contain the following patterns of data compress very well:</div>
<ul>
<li class="MsoNormal">Columns with numeric or fixed-length character data types where most values don’t require all the allocated bytes: For example, integers where most values are less than 1000</li>
<li class="MsoNormal">Nullable columns where a significant number of the rows have a NULL value for the column</li>
<li class="MsoNormal">Significant amounts of repeating data values or repeating prefix values in the data</li>
</ul>
<div class="MsoNormal">
Some patterns of data that do not benefit much from compression are:</div>
<ul>
<li class="MsoNormal">Columns with numeric or fixed-length character data types where most values require all the bytes allocated for the specific data type </li>
<li class="MsoNormal">Not much repeating data</li>
<li class="MsoNormal">Repeating data with non-repeating prefixes</li>
<li class="MsoNormal">Data stored out of the row</li>
<li class="MsoNormal">FILESTREAM data</li>
</ul>
<div class="MsoNormal">
A table or a partition can have three allocation units - <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/ms189051.aspx"><span style="color: #1364c4;">IN_ROW_DATA, LOB_DATA, and ROW_OVERFLOW_DATA</span></a></a>. The data stored in LOB_DATA and ROW_OVERFLOW_DATA allocation units is not compressed. Only the data that is stored in the IN_ROW_DATA allocation unit is compressed. Use <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/dd894051(v=sql.100).aspx#_Appendix_C:_Script"><span style="color: #1364c4;">Appendix B</span></a></a> to understand how much data is stored in each of these three allocation units.</div>
<div class="MsoNormal">
<a href=""></a><a href="http://msdn.microsoft.com/en-us/library/cc949109.aspx"><span style="color: #1364c4;">FILESTREAM</span></a> </a>data is stored outside the database in a FILESTREAM data container on an NTFS volume. This data is not compressed.</div>
<h2>
<a href="" id="_Toc206299644"></a></h2>
<h2>
Application Workload</h2>
<div class="MsoNormal">
Compressed pages are persisted as compressed on disk and stay compressed when read into memory. Data is decompressed (not the entire page, but only the data values of interest) when it meets one of the following conditions: </div>
<ul>
<li class="MsoNormal">It is read for filtering, sorting, joining, as part of a query response.</li>
<li class="MsoNormal">It is updated by an application. </li>
</ul>
<div class="MsoNormal">
There is no in-memory, decompressed copy of the compressed page. Decompressing data consumes CPU. However, because compressed data uses fewer data pages, it also saves:</div>
<ul>
<li class="MsoNormal">Physical I/O: Because physical I/O is expensive from a workload perspective, reduced physical I/O often results in a bigger saving than the additional CPU cost to compress and decompress the data. Note that physical I/O is saved both because a smaller volume of data is read from or written to disk, <em>and</em> because more data can remain cached in buffer pool memory.</li>
<li class="MsoNormal">Logical I/O (if data is in memory): Because logical I/O consumes CPU, reduced logical I/O can sometimes compensate for the CPU cost to compress and decompress the data. </li>
</ul>
<div class="MsoNormal">
The savings in logical and physical I/O is largest when tables or indexes are scanned. When singleton lookups (for read or write) are performed, I/O savings from compression are smaller - they only occur if compression causes more requests to target the same page, and this leads to reduced physical I/O.</div>
<div class="MsoNormal">
The CPU overhead of row compression is usually minimal (generally less than or equal to 10 percent in our experience). If row compression results in space savings and the system can accommodate a 10 percent increase in CPU usage, all data should be row-compressed. For example, <a href=""></a><a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a236a2-8104-2b10-5ebe-8fef61cc82fd"><span style="color: #1364c4;">SAP ERP NetWeaver 7.00 Business Suite 7</span></a></a> and above use row compression on all tables.</div>
<div class="MsoNormal">
The CPU overhead of page compression can be higher than row compression, and therefore deciding what to page-compress is more difficult. Some general guidelines for page compression are: </div>
<ul>
<li class="MsoNormal">Start with less frequently used tables and indexes to ensure the understanding of the system behavior is accurate.</li>
<li class="MsoNormal">If CPU headroom is not available, do not use page compression without thorough testing.</li>
<li class="MsoNormal">Query operations such as filtering, joins, aggregates, and sorting see decompressed data, and hence the cost of these operations are not affected by data compression. A query, whose cost is dominated by complex processing operations (for example, a query involving multiple table joins or complex aggregate operations) is much less likely to see any significant change in performance or CPU utilization, due to data compression. These complex queries usually occur in data warehousing applications, but they can occur in other applications as well. If CPU time for an application consists primarily of complex queries, page compression may not impact CPU measurably. In such scenarios, space savings may be the prime driver for data compression.</li>
<li class="MsoNormal">Most large-scale data warehousing workloads are scan-intensive, and storage is typically a premium as well. In a data warehouse or large-scale data mart, if there is CPU headroom available, we recommend page-compressing all objects in the database, rather than evaluating object-by-object as outlined below.</li>
</ul>
<div class="MsoNormal">
A more detailed approach to deciding what to compress involves analyzing the workload characteristics for each table and index. It is based on the following two metrics:</div>
<ul>
<li class="MsoNormal">U: The percentage of update operations on a specific table, index, or partition, relative to total operations on that object. The lower the value of U (that is, the table, index, or partition is infrequently updated), the better candidate it is for page compression. </li>
<li class="MsoNormal">S: The percentage of scan operations on a table, index, or partition, relative to total operations on that object. The higher the value of S (that is, the table, index, or partition is mostly scanned), the better candidate it is for page compression.</li>
</ul>
<h3>
U: Percent of Update Operations on the Object</h3>
<div class="MsoNormal">
To compute U, use the statistics in the DMV <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms174281.aspx"><span style="color: #960bb4;">sys.dm_db_index_operational_stats</span></a></a>. U is the ratio (expressed in percent) of updates performed on a table or index to the sum of all operations (scans + DMLs + lookups) on that table or index. The following query reports U for each table and index in the database. </div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_7afb4869-3350-4f70-8470-3e2eb5e6d8b7');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_7afb4869-3350-4f70-8470-3e2eb5e6d8b7">
<div style="color: black;">
<pre>SELECT o.name AS [Table_Name], x.name AS [Index_Name],
i.partition_number AS [Partition],
i.index_id AS [Index_ID], x.type_desc AS [Index_Type],
i.leaf_update_count * 100.0 /
(i.range_scan_count + i.leaf_insert_count
+ i.leaf_delete_count + i.leaf_update_count
+ i.leaf_page_merge_count + i.singleton_lookup_count
) AS [Percent_Update]
FROM sys.dm_db_index_operational_stats (db_id(), NULL, NULL, NULL) i
JOIN sys.objects o ON o.object_id = i.object_id
JOIN sys.indexes x ON x.object_id = i.object_id AND x.index_id = i.index_id
WHERE (i.range_scan_count + i.leaf_insert_count
+ i.leaf_delete_count + leaf_update_count
+ i.leaf_page_merge_count + i.singleton_lookup_count) != 0
AND objectproperty(i.object_id,'IsUserTable') = 1
ORDER BY [Percent_Update] ASC
</pre>
</div>
</div>
</div>
</div>
<h3>
S: Percent of Scan Operations on the Object</h3>
<div class="MsoNormal">
To compute S, use the statistics in the DMV <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms174281.aspx"><span style="color: #960bb4;">sys.dm_db_index_operational_stats</span></a></a>. S is the ratio (expressed in percent) of scans performed on a table or index to the sum of all operations (scans + DMLs + lookups) on that table or index. In other words, S represents how heavily the table or index is scanned. The following query reports S for each table, index, and partition in the database.</div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_7d04e76f-68ad-41f7-b71c-43f17e1a1a33');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_7d04e76f-68ad-41f7-b71c-43f17e1a1a33">
<div style="color: black;">
<pre>SELECT o.name AS [Table_Name], x.name AS [Index_Name],
i.partition_number AS [Partition],
i.index_id AS [Index_ID], x.type_desc AS [Index_Type],
i.range_scan_count * 100.0 /
(i.range_scan_count + i.leaf_insert_count
+ i.leaf_delete_count + i.leaf_update_count
+ i.leaf_page_merge_count + i.singleton_lookup_count
) AS [Percent_Scan]
FROM sys.dm_db_index_operational_stats (db_id(), NULL, NULL, NULL) i
JOIN sys.objects o ON o.object_id = i.object_id
JOIN sys.indexes x ON x.object_id = i.object_id AND x.index_id = i.index_id
WHERE (i.range_scan_count + i.leaf_insert_count
+ i.leaf_delete_count + leaf_update_count
+ i.leaf_page_merge_count + i.singleton_lookup_count) != 0
AND objectproperty(i.object_id,'IsUserTable') = 1
ORDER BY [Percent_Scan] DESC
</pre>
</div>
</div>
</div>
</div>
<div class="MsoNormal">
Be aware that the counters in the DMV sys.dm_db_index_operational_statsreflect the operational statistics of the tables and indexes in the metadata cache. Carefully consider the timeframe of the statistics used. If you prefer to err on the side of too little compression, use performance statistics during the period where CPU usage is the highest (for example, month-end processing).</div>
<div class="MsoNormal">
For active tables and indexes, the statistics reflected are cumulative since the time the SQL Server service was restarted, or since the last time the database was opened. Less active objects may not have operational statistics in this DMV; however, the less active objects may be good candidates for page compression, provided they are of significant size and the estimated space saving is significant.</div>
<div class="MsoNormal">
Inserts to append-only (inserted at the end of the table) tables that are rarely used, do not have much overhead for page compression. Such tables may perform well with page compression even if S is low. Examples of such tables are logging or audit tables, which are written once and rarely read. These are good candidates for page compression. </div>
<h3>
Example</h3>
<div class="MsoNormal">
Here is an example how a customer used these measurements to decide which tables to page-compress. The customer had an OLTP database running on a server with average CPU utilization of approximately 20 percent. The large amount of available CPU, the significant amount of planned database growth, and the expense of storage provided motivation for data compression. The customer computed space savings, and the U and S measurements for the largest tables in the database, and targeted tables with S greater than 75 percent, U less than 20 percent for page compression. Table 1 shows the estimated row and page savings, the values of S and U, and the decision as to whether to row or page compress.</div>
<table class="MtpsTableHeadered"><tbody>
<tr><th>Table </th><th>Savings ROW % </th><th>Savings PAGE % </th><th>S </th><th>U </th><th>Decision </th><th>Notes </th></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T1</div>
</td><td valign="bottom"><div class="MsoNormal">
80%</div>
</td><td valign="bottom"><div class="MsoNormal">
90%</div>
</td><td valign="bottom"><div class="MsoNormal">
3.80%</div>
</td><td valign="bottom"><div class="MsoNormal">
57.27%</div>
</td><td valign="bottom"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
Low S, very high U. ROW savings close to PAGE</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T2</div>
</td><td valign="bottom"><div class="MsoNormal">
15%</div>
</td><td valign="bottom"><div class="MsoNormal">
89%</div>
</td><td valign="bottom"><div class="MsoNormal">
92.46%</div>
</td><td valign="bottom"><div class="MsoNormal">
0%</div>
</td><td valign="bottom"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
Very high S</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T3</div>
</td><td valign="bottom"><div class="MsoNormal">
30%</div>
</td><td valign="bottom"><div class="MsoNormal">
81%</div>
</td><td valign="bottom"><div class="MsoNormal">
27.14%</div>
</td><td valign="bottom"><div class="MsoNormal">
4.17%</div>
</td><td valign="bottom"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
Low S</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T4</div>
</td><td valign="bottom"><div class="MsoNormal">
38%</div>
</td><td valign="bottom"><div class="MsoNormal">
83%</div>
</td><td valign="bottom"><div class="MsoNormal">
89.16%</div>
</td><td valign="bottom"><div class="MsoNormal">
10.54%</div>
</td><td valign="bottom"><div class="MsoNormal">
ROW </div>
</td><td valign="top"><div class="MsoNormal">
High U</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T5</div>
</td><td valign="bottom"><div class="MsoNormal">
21%</div>
</td><td valign="bottom"><div class="MsoNormal">
87%</div>
</td><td valign="bottom"><div class="MsoNormal">
0.00%</div>
</td><td valign="bottom"><div class="MsoNormal">
0%</div>
</td><td valign="bottom"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
Append ONLY table</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T6</div>
</td><td valign="bottom"><div class="MsoNormal">
28%</div>
</td><td valign="bottom"><div class="MsoNormal">
87%</div>
</td><td valign="bottom"><div class="MsoNormal">
87.54%</div>
</td><td valign="bottom"><div class="MsoNormal">
0%</div>
</td><td valign="bottom"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
High S, low U</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T7</div>
</td><td valign="bottom"><div class="MsoNormal">
29%</div>
</td><td valign="bottom"><div class="MsoNormal">
88%</div>
</td><td valign="bottom"><div class="MsoNormal">
0.50%</div>
</td><td valign="bottom"><div class="MsoNormal">
0%</div>
</td><td valign="bottom"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
99% appends</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T8</div>
</td><td valign="bottom"><div class="MsoNormal">
30%</div>
</td><td valign="bottom"><div class="MsoNormal">
90%</div>
</td><td valign="bottom"><div class="MsoNormal">
11.44%</div>
</td><td valign="bottom"><div class="MsoNormal">
0.06%</div>
</td><td valign="bottom"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
85% appends</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T9</div>
</td><td valign="bottom"><div class="MsoNormal">
84%</div>
</td><td valign="bottom"><div class="MsoNormal">
92%</div>
</td><td valign="bottom"><div class="MsoNormal">
0.02%</div>
</td><td valign="bottom"><div class="MsoNormal">
0.00%</div>
</td><td valign="bottom"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
ROW savings ~= PAGE</div>
</td></tr>
<tr><td valign="bottom"><div class="MsoNormal">
T10</div>
</td><td valign="bottom"><div class="MsoNormal">
15%</div>
</td><td valign="bottom"><div class="MsoNormal">
89%</div>
</td><td valign="bottom"><div class="MsoNormal">
100.00%</div>
</td><td valign="bottom"><div class="MsoNormal">
0.00%</div>
</td><td valign="bottom"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
Read ONLY table</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 1: Deciding what to compress</strong></div>
<div class="MsoNormal">
Based on the metrics shown in Table 1, the customer decided to page-compress tables T2, T5, T6, T7, T8, and T10. All other tables in the database were row-compressed. Following this plan, the customer achieved 50 percent space savings, and approximately 10 percent increase in CPU utilization.</div>
<h1>
Planning Compression: Estimating Workspace, CPU, I/O</h1>
<div class="MsoNormal">
Tables and indexes are compressed using the <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms190273.aspx"><span style="color: #1364c4;">ALTER TABLE… REBUILD</span></a></a> and <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms188388.aspx"><span style="color: #1364c4;">ALTER INDEX … REBUILD</span></a></a> statements respectively. Compressing a table or an index requires workspace, CPU, and I/O. Compressing a table or index uses the same mechanism as rebuilding an index. This section provides estimated resource requirements for compressing a clustered index, alongside the resource requirements for rebuilding the same uncompressed index, for comparison. The resource requirements depend upon:</div>
<ul>
<li class="MsoNormal">Whether you are compressing a heap, a clustered index, or a nonclustered index</li>
<li class="MsoNormal">Whether you set the SORT_IN_TEMPDB option to ON</li>
<li class="MsoNormal">Whether you are performing the compression operation with the ONLINE option set to ON</li>
<li class="MsoNormal">Whether you are using the simple, bulk logged, or full recovery model</li>
</ul>
<h2>
<a href="" id="_Toc206299645"></a></h2>
<h2>
Workspace</h2>
<div class="MsoNormal">
Free workspace is required in the following:</div>
<ul>
<li class="MsoNormal">User database</li>
<li class="MsoNormal">Transaction log</li>
<li class="MsoNormal"><strong>tempdb</strong></li>
</ul>
<div class="MsoNormal">
Estimate the workspace requirements before starting the compression and have enough free space to avoid potentially expensive autogrow of the database files or failed compression due to lack of disk space. Use the script in <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/dd894051(v=sql.100).aspx#_Appendix_D:_Script"><span style="color: #1364c4;">Appendix C</span></a></a> to determine the available free space in each filegroup.</div>
<h3>
Workspace Required in the User Database</h3>
<div class="MsoNormal">
In the user database, free workspace is required for the following:</div>
<ul>
<li class="MsoNormal">The compressed table or index</li>
<li class="MsoNormal">The <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms191261(sql.90).aspx"><span style="color: #960bb4;">mapping index</span></a></a> if you are compressing a heap or a clustered index with the ONLINE option set to ON and the SORT_IN_TEMPDB option set to OFF. (The recommendation is to set SORT_IN_TEMPDB to ON. The workspace requirement for the mapping index is discussed in the <strong>tempdb</strong> section.).</li>
</ul>
<div class="MsoNormal">
While a table is being compressed, both the uncompressed table and the compressed table exist together until the compression is successful and committed. After the table or the index is compressed, the uncompressed table is dropped, and the space is released to the filegroup. To estimate the size of the compressed table, use the output of sp_estimate_data_compression_savings. </div>
<h3>
Transaction Log Space</h3>
<div class="MsoNormal">
The amount of transaction log space needed depends on whether ONLINE is set to ON or OFF, and the recovery model used (<a href=""></a><a href="http://technet.microsoft.com/en-us/magazine/2009.02.logging.aspx"><span style="color: #1364c4;">full, bulk-logged, or simple</span></a></a>).</div>
<h3>
Workspace Required in tempdb</h3>
<div class="MsoNormal">
In the <strong>tempdb</strong> database, free workspace is required if ONLINE is set to ON: </div>
<ul>
<li class="MsoNormal">For the <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms191261(sql.90).aspx"><span style="color: #960bb4;">mapping index</span></a></a>, an internal structure used to map old bookmarks to new bookmarks, enabling concurrent DML transactions. This is stored in <strong>tempdb</strong> if SORT_IN_TEMPDB is set to ON.</li>
<li class="MsoNormal">For the version store. This is only used if there are concurrent DML operations. Size depends upon the volume of ongoing modifications and duration of long running DML transactions.</li>
</ul>
<h2>
I/O</h2>
<div class="MsoNormal">
I/O is generally proportional to the workspace used.</div>
<h2>
CPU</h2>
<div class="MsoNormal">
On average, row compression takes 1.5 times the CPU time used for rebuilding an index, whereas page compression takes 2 to 5 times the CPU time used for rebuilding an index. As an example data point, 41 CPU seconds per GB for index rebuild, 48 CPU seconds per GB for row compression, and 182 CPU seconds per GB for page compression were observed with ONLINE set to OFF, on the hardware listed in Appendix A. ONLINE operations require more CPU. These numbers are meant to give a general ballpark, not to be precise, because the performance varies depending upon the characteristics of the data and the hardware.</div>
<div class="MsoNormal">
Rebuilding and compression can be parallelized and take advantage of multiple CPUs. An example of using the MAXDOP option is shown in this <a href=""></a><a href="http://sqlblog.com/blogs/linchi_shea/archive/2008/05/05/sql-server-2008-page-compression-using-multiple-processors.aspx"><span style="color: #1364c4;">blog</span></a></a>. There are two caveats: </div>
<ul>
<li class="MsoNormal">SQL Server uses statistics on the leading column to distribute work amongst multiple CPUs, thus multiple CPUs are not beneficial when creating, rebuilding, or compressing an index where the leading column of the index has relatively few unique values or when the data is heavily skewed to just a small number of leading key values – only limited effective parallelism will be achieved in this case.</li>
<li class="MsoNormal">Compressing or rebuilding a heap with ONLINE set to ON uses a single CPU for compression or rebuild. However, SQL Server first needs to scan the table—the scan is parallelized, and after the table scan is complete, the rest of the compression processing of the heap is single-threaded.</li>
</ul>
<h2>
Summary of Resource Requirements for Data Compression</h2>
<div class="MsoNormal">
Table 2 shows a summary of workspace, CPU, and I/O requirements for compressing a clustered index as compared to rebuilding the same uncompressed index. Measurements used:</div>
<ul>
<li class="MsoNormal">X = number of pages before compression (or rebuild)</li>
<li class="MsoNormal">P = number of pages after compression (P < X)</li>
<li class="MsoNormal">Y = number of new or updated pages (by a concurrent application, applies only to the ONLINE case)</li>
<li class="MsoNormal">M = size of the mapping index (estimate based on guidelines in the TEMPDB Capacity Planning white paper)</li>
<li class="MsoNormal">C = the CPU time taken to rebuild the uncompressed index</li>
</ul>
<table class="MsoTableGrid"><tbody>
<tr><td rowspan="2" valign="top"><div class="MsoNormal">
</div>
</td><td colspan="3" valign="top"><div class="MsoNormal">
<strong>Workspace</strong></div>
</td><td colspan="3" valign="top"><div class="MsoNormal">
<strong>I/O</strong></div>
</td><td rowspan="2" valign="top"><div class="MsoNormal">
<strong>CPU</strong></div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>TEMPDB</strong></div>
</td><td valign="top"><div class="MsoNormal">
<strong>UserDB</strong></div>
</td><td valign="top"><div class="MsoNormal">
<strong>UserDB Tran Log</strong></div>
</td><td valign="top"><div class="MsoNormal">
<strong>TEMPDB</strong></div>
</td><td valign="top"><div class="MsoNormal">
<strong>UserDB</strong></div>
</td><td valign="top"><div class="MsoNormal">
<strong>UserDB Tran Log</strong></div>
</td></tr>
<tr><td colspan="8" valign="top"><div class="MsoNormal">
<strong>OFFLINE with BULK_LOGGED or SIMPLE Recovery Model</strong></div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>Rebuild</strong></div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
X</div>
</td><td valign="top"><div class="MsoNormal">
~0</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
X+2X</div>
</td><td valign="top"><div class="MsoNormal">
~0</div>
</td><td valign="top"><div class="MsoNormal">
C</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>Compress</strong></div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
P</div>
</td><td valign="top"><div class="MsoNormal">
~0</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
X+2P</div>
</td><td valign="top"><div class="MsoNormal">
~0</div>
</td><td valign="top"><div class="MsoNormal">
1.5C to 5C</div>
</td></tr>
<tr><td colspan="8" valign="top"><div class="MsoNormal">
<strong>OFFLINE with FULL Recovery Model</strong></div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>Rebuild</strong></div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
X</div>
</td><td valign="top"><div class="MsoNormal">
X</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
X+X</div>
</td><td valign="top"><div class="MsoNormal">
X</div>
</td><td valign="top"><div class="MsoNormal">
~C</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>Compress</strong></div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
P</div>
</td><td valign="top"><div class="MsoNormal">
P</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
X+P</div>
</td><td valign="top"><div class="MsoNormal">
P</div>
</td><td valign="top"><div class="MsoNormal">
1.5C to 5C</div>
</td></tr>
<tr><td colspan="8" valign="top"><div class="MsoNormal">
<strong>ONLINE with FULL Recovery Model</strong></div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>Rebuild</strong></div>
</td><td valign="top"><div class="MsoNormal">
M+Y</div>
</td><td valign="top"><div class="MsoNormal">
X+Y</div>
</td><td valign="top"><div class="MsoNormal">
2X+Y</div>
</td><td valign="top"><div class="MsoNormal">
M+4Y</div>
</td><td valign="top"><div class="MsoNormal">
X+X+Y</div>
</td><td valign="top"><div class="MsoNormal">
2X+Y</div>
</td><td valign="top"><div class="MsoNormal">
~2C</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
<strong>Compress</strong></div>
</td><td valign="top"><div class="MsoNormal">
M+Y</div>
</td><td valign="top"><div class="MsoNormal">
P+Y</div>
</td><td valign="top"><div class="MsoNormal">
2P+Y</div>
</td><td valign="top"><div class="MsoNormal">
M+4Y</div>
</td><td valign="top"><div class="MsoNormal">
X+P+Y</div>
</td><td valign="top"><div class="MsoNormal">
2P+Y</div>
</td><td valign="top"><div class="MsoNormal">
3C to 10C</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 2: Workspace, CPU, and I/O summary for compressing a clustered index</strong></div>
<div class="MsoNormal">
Some important notes from Table 2:</div>
<ul>
<li class="MsoNormal">Comparing to rebuild without compression, compression uses less workspace and I/O, but more CPU. The reduced workspace/I/O is due to the smaller size of the resulting structure.</li>
<li class="MsoNormal">The lowest resource utilization is when running OFFLINE with the bulk-logged or simple recovery model. Offline, bulk operations involve reading the existing data, and writing new, compressed data. Minimal log is written—only the allocations are logged. </li>
<li class="MsoNormal">If it is not possible to use the BULK_LOGGED or SIMPLE recovery model (but still using OFFLINE), additional I/O is needed to fully log the compressed data, with the full recovery model. No additional workspace (compared to bulk-logged) is allocated, because log space is reserved even in the bulk-logged and simple recovery models. </li>
<li class="MsoNormal">Many production systems cannot run in bulk-logged or simple mode, and many systems cannot afford downtime for OFFLINE compression. ONLINE operations require about twice as much CPU as OFFLINE operations.</li>
</ul>
<h2>
How and When to Compress</h2>
<div class="MsoNormal">
The key decisions to be made on when and how to compress are: </div>
<ul>
<li class="MsoNormal">Online vs. Offline: Whether to set the value of ONLINE to ON or OFF depends upon what else is running on the database at the same time. OFF is faster and requires less resources than ON, but the table is locked for the duration of the compression operation. Be aware of the restrictions of online operations as discussed in <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/ms190981.aspx"><span style="color: #1364c4;">SQL Server Books Online</span></a></a>.</li>
<li class="MsoNormal">One table, index, or partition at a time vs. many concurrently: Compressing one table, index, or partition at a time is recommended in most cases. When doing multiple simultaneous compressions, workspace, I/O, and CPU requirements outlined earlier must be available for all the compressions together. Be mindful of the risk of insufficient free space and the need to expand data files, as well as the likelihood of large amount of unused space in the data files at the end of compression. If you have sufficient resources (workspace, I/O, and CPU), and have an efficient mechanism to reclaim the unused space (refer to section 6 later in this white paper), executing multiple compressions simultaneously may be acceptable.</li>
<li class="MsoNormal">Order of compressing the tables: After you have decided on the list of tables and indexes to compress, compress the objects starting with the smallest in this list. Compressing smaller objects requires less workspace, and it releases space to the data files that can be used as workspace for compressing the larger objects subsequently. This approach minimizes the need for additional disk space during the compression process.</li>
<li class="MsoNormal">Setting SORT_IN_TEMPDB to ON or OFF: ON is recommended. This makes use of <strong>tempdb</strong> space for the mapping index, and therefore, it requires less workspace in the user database.</li>
</ul>
<h2>
Side Effects of Compressing a Table or Index</h2>
<div class="MsoNormal">
When you compress a table or an index, you should be aware of two side effects:</div>
<ul>
<li class="MsoNormal">Compression includes a rebuild, thus removing fragmentation from the table or index.</li>
<li class="MsoNormal">When a heap is compressed, if there are any nonclustered indexes on the heap, they are rebuilt as follows:</li>
</ul>
<div class="MsoNormal">
o With ONLINE set to OFF, the nonclustered indexes are rebuilt one by one.</div>
<div class="MsoNormal">
o With ONLINE set to ON, all the nonclustered indexes are rebuilt simultaneously.</div>
<div class="MsoNormal">
You must account for the workspace required to rebuild the nonclustered indexes, because the space for the uncompressed heap is not released until the rebuild of the nonclustered indexes is complete.</div>
<h1>
Manipulating Compressed Data</h1>
<div class="MsoNormal">
This section explains what happens when compressed data is changed: new rows inserted, rows deleted or updated.</div>
<h2>
<a href="" id="_Toc206299649"></a></h2>
<h2>
Newly-Inserted Rows</h2>
<div class="MsoNormal">
With row compression, newly inserted rows are row-compressed. With page compression, a newly inserted row is row-compressed or page-compressed, depending upon the following:</div>
<ul>
<li class="MsoNormal">The table organization: heap or clustered index</li>
<li class="MsoNormal">How and where the new row is inserted</li>
</ul>
<div class="MsoNormal">
Table 3 summarizes the compression state of the newly inserted rows into a compressed table.</div>
<table class="MsoNormalTable"><tbody>
<tr><td rowspan="2"><div class="MsoNoSpacing">
Table organization</div>
</td><td colspan="2"><div class="MsoNoSpacing">
Table compression setting</div>
</td></tr>
<tr><td><div class="MsoNoSpacing">
ROW</div>
</td><td><div class="MsoNoSpacing">
PAGE</div>
</td></tr>
<tr><td><div class="MsoNoSpacing">
Heap</div>
</td><td><div class="MsoNoSpacing">
The newly inserted row is row-compressed.</div>
</td><td><div class="MsoNoSpacing">
The newly inserted row is page-compressed:</div>
<div class="MsoNoSpacing">
· if new row goes to an existing page with page compression</div>
<div class="MsoNoSpacing">
· if the new row is inserted through BULK INSERT with TABLOCK</div>
<div class="MsoNoSpacing">
· if the new row is inserted through INSERT INTO ... (TABLOCK) SELECT ... FROM</div>
<div class="MsoNoSpacing">
Otherwise, the row is row-compressed.* </div>
</td></tr>
<tr><td><div class="MsoNoSpacing">
Clustered index</div>
</td><td><div class="MsoNoSpacing">
The newly inserted row is row-compressed.</div>
</td><td><div class="MsoNoSpacing">
The newly inserted row is page-compressed if new row goes to an existing page with page compression Otherwise, it is row compressed until the page fills up. Page compression is attempted before a page split.** </div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 3: Compression of the newly inserted rows into a compressed heap or clustered index</strong></div>
<div class="MsoNormal">
* The resulting row-compressed pages can be page-compressed by running a heap rebuild with page compression. </div>
<div class="MsoNormal">
** With page compression, all the pages in the table may not actually be page-compressed. A page is page-compressed only if the space savings on that page exceeds an internally defined threshold.</div>
<h2>
Updating or Deleting Compressed Rows</h2>
<div class="MsoNormal">
All updates to the rows in a row-compressed table or partition will maintain the rows in row-compressed format. Not every update to the rows in a page-compressed table or partition will cause the column prefix and page dictionary to be recomputed. When the number of changes on a given page-compressed page exceeds an internally defined threshold, the column prefix and page dictionary are recomputed.</div>
<h2>
What Happens to the Supporting Data Structures</h2>
<div class="MsoNormal">
When an application manipulates (INSERT, UPDATE, DELETE, CREATE/REBUILD INDEX, and so on) data in a table, some supporting data structures may be created by SQL Server, which may temporarily hold a subset of the data. Some of these data structures are:</div>
<ul>
<li class="MsoNormal">Transaction log</li>
<li class="MsoNormal">Mapping index</li>
<li class="MsoNormal">Version store</li>
<li class="MsoNormal">Sort pages</li>
</ul>
<div class="MsoNormal">
Whether or not these supporting structures are compressed if the data in a compressed table is manipulated depends upon the type of the data structure and the type of data compression used on the table. Table 4 summarizes the compression characteristics of the supporting data structures when a compressed table is manipulated.</div>
<table class="MtpsTableHeadered"><tbody>
<tr><th>Table compression </th><th>Transaction log </th><th>Mapping index for rebuilding the clustered index </th><th>Sort pages for queries </th><th>Version store (with SI or RCSI isolation level) </th></tr>
<tr><td valign="top"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
NONE</div>
</td><td valign="top"><div class="MsoNormal">
NONE</div>
</td><td valign="top"><div class="MsoNormal">
ROW</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
NONE</div>
</td><td valign="top"><div class="MsoNormal">
NONE</div>
</td><td valign="top"><div class="MsoNormal">
ROW</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<strong>Table 4: Compression characteristics of supporting data structures when data in a compressed table is modified</strong></div>
<h2>
On a Page-Compressed Index, Nonleaf Pages are Row-Compressed</h2>
<div class="MsoNormal">
All updates to the rows in a row-compressed table or partition will maintain the rows in row-compressed format. Not every update to the rows in a page-compressed table or partition will cause the column prefix and page dictionary to be recomputed. When the number of changes on a given page-compressed page exceeds an internally defined threshold, the column prefix and page dictionary are recomputed.</div>
<div class="MsoNormal">
On a page-compressed index (clustered or nonclustered), the leaf level pages are page-compressed; but the nonleaf pages are row-compressed, not page-compressed (see Appendix D). This is for efficiency reasons.</div>
<ul>
<li class="MsoNormal">The number of nonleaf pages in an index are relatively small, and the space saving that would result from page-compressing these pages is relatively insignificant.</li>
<li class="MsoNormal">The nonleaf pages are accessed much more frequently, and having them row-compressed (instead of page-compressed) reduces the cost of decompressing them on each access.</li>
</ul>
<h1>
Reclaiming the Space Released by Data Compression</h1>
<div class="MsoNormal">
After data compression has completed, the space saved is released to the respective data file(s). However, the space is not released to the filesystem, because the file size doesn’t reduce automatically as part of data compression. There are several options to release the space to the filesystem by reducing the size of the file(s):</div>
<div class="MsoNormal">
<strong>Option 1:</strong> You can decide not to reclaim the released space, keeping the free space in the filegroup for the future data growth. This is a simple option for databases where the data volume within the existing filegroups is expected to grow in the future. It is not an option for partitioned tables where each partition is allocated on a different filegroup, and you want to compress the older read-only partitions to save disk space.</div>
<div class="MsoNormal">
<strong>Option 2:</strong> DBCC SHRINKFILE (or DBCC SHRINKDATABASE) is an option, but shrinking a database file severely fragments its contents. Also be aware that DBCC SHRINKFILE is single-threaded and may take a long time to complete. In a test, after a clustered index was page-compressed, a filegroup had about 68 percent free space. After DBCC SHRINKFILE, the fragmentation became 100 percent.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig1.jpg" id="image002" src="http://i.msdn.microsoft.com/dynimg/IC297976.jpg" title="DataCompressionFig1.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 1: Database free space and percent fragmentation after DBCC SHRINKFILE</strong></div>
<div class="MsoNormal">
After ALTER INDEX … REORGANIZE, the fragmentation reduced to 0. Use REORGANIZE (which does not require additional data file space), and not REBUILD (which creates a new index and then drops the existing index, requiring more workspace in the filegroup and extending the data file again).</div>
<div class="MsoNormal">
<strong>Option 3:</strong> If compressing all the tables in a filegroup:</div>
<div class="MsoNormal">
- Create a new filegroup.</div>
<div class="MsoNormal">
- Move tables and indexes to the new filegroup while compressing.</div>
<div class="MsoNormal">
- You need to create (or re-create, if one already exists) a clustered index (to move a heap, refer to Option 4) on the table and move it to the new filegroup in one operation. Use the DROP_EXISTING option of CREATE CLUSTERED INDEX command, if you already have a clustered index. For example:</div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_971a5387-a5b0-4c02-a603-3a1c810979df');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_971a5387-a5b0-4c02-a603-3a1c810979df">
<div style="color: black;">
<pre>CREATE UNIQUE CLUSTERED INDEX [PK_TRADE]
ON [TRADE_BULK] ([T_ID] ASC)
WITH (DATA_COMPRESSION=PAGE, DROP_EXISTING=ON, SORT_IN_TEMPDB=ON) ON [FG_Data2]
</pre>
</div>
</div>
</div>
</div>
<div class="MsoNormal">
- After all the tables and indexes from the old filegroup have been compressed and moved to the new filegroup, the old filegroup and its file(s) can be removed to release space to the filesystem.</div>
<div class="MsoNormal">
- Be aware of a caveat in this method. If the table has a LOB_DATA allocation unit in the same filegroup, then this method will not move the LOB_DATA to the new filegroup (only the IN_ROW_DATA and ROW_OVERFLOW_DATA allocation units are moved when a clustered index is re-created in a different filegroup). So the old filegroup will not be completely empty, and hence cannot be dropped.</div>
<div class="MsoNormal">
<strong>Option 4:</strong> There is another solution if you are compressing all the tables in a filegroup. Create an empty table in the new filegroup, compress it, and then copy the data over to the new table using INSERT … SELECT.</div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_79359281-b531-4053-a33a-35e5b211a5d7');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_79359281-b531-4053-a33a-35e5b211a5d7">
<div style="color: black;">
<pre>-- Create a new empty table in the new filegroup
ALTER DATABASE [TestDB] MODIFY FILEGROUP FG_COMP DEFAULT;
SELECT * INTO [Tab1] FROM [Tab] WHERE 1 = 2;
-- Compress the newly created empty table
ALTER TABLE [Tab1] REBUILD WITH (DATA_COMPRESSION = PAGE);
-- Create the appropriate indexes on the table
-- Copy the data over to the new table
INSERT INTO [Tab1] WITH (TABLOCK) SELECT * FROM [Tab]
-- The incoming data will be compressed as it gets inserted
-- TABLOCK is required if the target table is a heap
-- Trace flag 610 may help enable minimal logging
-- The LOB_DATA allocation unit will also be copied
-- Drop the old table and rename the new table as old table
-- After all the tables are copied like this, remove the old filegroup
</pre>
</div>
</div>
</div>
</div>
<h1>
Application Performance with Data Compression</h1>
<div class="MsoNormal">
As discussed earlier, data compression reduces logical and physical I/O, but it increases CPU consumed. In this section we discuss some workloads and their performance behavior under data compression.</div>
<h2>
Workload 1: An OLTP Application with High Volumes of DML Operations</h2>
<div class="MsoNormal">
Figure 2 shows the performance achieved by a customer on an OLTP application with high volumes of DML (INSERT, UPDATE, and DELETE) operations. The average response time of four different types of business transactions were measured with NONE, ROW, and PAGE compression.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig2.jpg" id="image003" src="http://i.msdn.microsoft.com/dynimg/IC297977.jpg" title="DataCompressionFig2.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 2: A Customer OLTP workload performance with data compression</strong></div>
<div class="MsoNormal">
As illustrated in Figure 2, this workload achieved similar or better performance with row compression as compared to no compression, for all business transactions, except the fourth one. However, with page compression, all the business transactions took longer to complete as compared to no compression or row compression. Based on these tests, this customer decided to use row compression with all their tables and indexes in this application.</div>
<h2>
Workload 2: A Reporting Application with Large Queries</h2>
<div class="MsoNormal">
Figure 3 shows the performance achieved by a customer on a reporting application. The response times of eight queries were measured with no compression and page-compressed data in the customer’s test environment.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig3.jpg" id="image004" src="http://i.msdn.microsoft.com/dynimg/IC297978.jpg" title="DataCompressionFig3.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 3: A Customer reporting workload performance with data compression</strong></div>
<div class="MsoNormal">
As illustrated in Figure 3, this workload achieved better performance for all queries with page compression, as compared to no compression. For some queries the response time was cut in half or better. Based on these tests, this customer is planning to deploy page compression in production for this application.</div>
<h2>
Rebuilding Compressed Indexes</h2>
<div class="MsoNormal">
Rebuilding compressed indexes takes longer compared to rebuilding corresponding uncompressed indexes. Note that if the table is compressed, but the index (nonclustered) is not compressed, rebuilding that index will not require additional processing time.</div>
<div class="MsoNormal">
Rebuilding a compressed index involves decompressing the index pages and then rebuilding the index with compression. This requires longer time and more CPU resources. Figures 4 and 5 show the CPU usage and time taken to rebuild a clustered and a nonclustered index, respectively.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig4.jpg" id="image005" src="http://i.msdn.microsoft.com/dynimg/IC297979.jpg" title="DataCompressionFig4.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 4: CPU usage and time taken to build a clustered index</strong></div>
<div class="MsoNormal">
<img alt="DataCompressionFig5.jpg" id="image006" src="http://i.msdn.microsoft.com/dynimg/IC297980.jpg" title="DataCompressionFig5.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 5: CPU usage and time taken to build a nonclustered index</strong></div>
<div class="MsoNormal">
Note the significant increase in the CPU usage for rebuilding the page-compressed index. The reason for the high CPU usage is that when you rebuild a page-compressed index, the compression information (prefix and dictionary) on each (leaf-level) page is recomputed.</div>
<h2>
BULK INSERT with Data Compression</h2>
<div class="MsoNormal">
Bulk loading data into a compressed table involves compressing the data while performing the load. Therefore, BULK INSERT takes longer on a compressed table. Figure 6 shows the performance of BULK INSERT on a heap with and without data compression. The first three data points display BULK INSERT performance without the TABLOCK option. Notice that without the TABLOCK option, the size of the compressed heap table is the same with both row and page compression. If the TABLOCK option is not used while performing BULK INSERT on a page-compressed heap, the newly inserted pages will be row-compressed, instead of being page-compressed (refer to Table 3 in section 5.1). Use the query in Appendix E to confirm.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig6.jpg" id="image007" src="http://i.msdn.microsoft.com/dynimg/IC297981.jpg" title="DataCompressionFig6.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 6: BULK INSERT into a heap with and without data compression </strong></div>
<div class="MsoNormal">
The last data point in Figure 6 shows the BULK INSERT performance (on a page-compressed heap) with the TABLOCK option. Note that the TABLOCK option results in a smaller table size, because almost all the pages are page-compressed during the load. Therefore, remember to use the TABLOCK hint if you are loading data into a page-compressed heap. </div>
<div class="MsoNormal">
The same considerations apply if you are performing an INSERT … SELECT operation into a page compressed heap. Be sure to use the TABLOCK hint to ensure that new pages are compressed.</div>
<h2>
BULK INSERT Followed by CREATE CLUSTERED INDEX</h2>
<div class="MsoNormal">
In many bulk loading scenarios, loading data is typically followed by creating a clustered index. In a sliding window scenario, usually new data is loaded into an empty staging table, and then a clustered index (and other appropriate indexes and constraints) is created on the staging table, to make it ready for switching into an empty partition in a partitioned table. If you are loading data into an empty table and then creating a clustered index, and the data needs to be compressed, there are multiple options:</div>
<ul>
<li class="MsoNormal">Option 1: BULK INSERT into uncompressed heap, followed by CREATE CLUSTERED INDEX WITH (DATA_COMPRESSION = PAGE). Because the data is loaded into an uncompressed heap, it allows for faster loading compared to the other two options. This option allows compressing the data at the same time as creating the clustered index, thereby reducing the total time. However, more free space is needed in the user database compared to option 3, because, the uncompressed heap and the compressed clustered index need to reside in the user database simultaneously while the index is being created.</li>
<li class="MsoNormal">Option 2: BULK INSERT into a page-compressed heap, followed by CREATE CLUSTERED INDEX. Because the data is loaded into a heap, the loading is faster compared to option 3; however, because the heap is compressed, loading takes longer compared to option 1 (the data is compressed while being loaded). And, because the heap and the clustered index need to reside in the user database while the index is created, more free space is needed than option 3; but less than option 1, because both the heap and the clustered index are compressed.</li>
<li class="MsoNormal">Option 3: BULK INSERT into a page-compressed clustered index. This option takes longer, because the data is loaded into a clustered index, and data is compressed during loading, but all the tasks (loading, compressing, creating clustered index) are completed together. Because there is no post-processing involved in the form of creating the clustered index or compressing the data, no extra free space is required in the user database.</li>
</ul>
<div class="MsoNormal">
Figure 7 illustrates the time required for bulk loading data, creating a clustered index, and compressing the data. Figure 8 illustrates the workspace required for these tasks.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig7.jpg" id="image008" src="http://i.msdn.microsoft.com/dynimg/IC297982.jpg" title="DataCompressionFig7.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 7: Time required for bulk data loading, creating a clustered index, and compressing the data (simple recovery model, ONLINE = OFF, SORT_IN_TEMPDB = ON)</strong></div>
<div class="MsoNormal">
<img alt="DataCompressionFig8.jpg" id="image009" src="http://i.msdn.microsoft.com/dynimg/IC297983.jpg" title="DataCompressionFig8.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 8: Workspace required for bulk data loading, creating a clustered index, and compressing the data (simple recovery model, ONLINE = OFF, SORT_IN_TEMPDB = ON)</strong></div>
<h1>
Data Compression and Partition Manipulation</h1>
<div class="MsoNormal">
Partitioning provides flexibility for compressing data selectively. Each partition in a table can have a different compression setting. Be aware of the compression settings on partition manipulation operations, such as switch, split, and merge.</div>
<h2>
Switch</h2>
<div class="MsoNormal">
Switching a partition requires that the source and the target have the same compression setting. The target of the switch partition operation is always an empty partition (or table). Changing the compression setting of an empty partition or table is very quick, because this is a metadata-only operation. Therefore, check and change the compression setting of the target, if needed, prior to executing the switch command.</div>
<h2>
Split</h2>
<div class="MsoNormal">
New partition inherits the data compression property of the partition being split.</div>
<h2>
Merge</h2>
<div class="MsoNormal">
Merging two partitions essentially removes the boundary between the two partitions, thereby dropping one partition and moving all the data in that partition to the other partition. Therefore merging partitions involves a source partition (the partition being dropped) and a destination partition (the partition into which the data from the dropped partition is moving). The destination partition retains its compression property. </div>
<div class="MsoNormal">
If the destination partition’s compression setting is NONE, the data coming in from the source partition will be decompressed during the merge operation. If the destination partition’s compression setting is ROW, the data coming in from the source partition will be row-compressed during the merge operation. If the destination partition’s compression setting is PAGE, the data coming in from the source partition will be either row-compressed (if the table is a heap) or page-compressed (if the table is a clustered index), as shown in Table 5.</div>
<table class="MtpsTableHeadered"><tbody>
<tr><th>Compression setting of the destination partition </th><th>What happens to the data moving in from the source to the destination partition </th></tr>
<tr><td valign="top"><div class="MsoNormal">
NONE</div>
</td><td valign="top"><div class="MsoNormal">
The incoming data is decompressed during merge</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
ROW</div>
</td><td valign="top"><div class="MsoNormal">
The incoming data is row-compressed during merge</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
- Heap: The incoming data is row-compressed during merge </div>
<div class="MsoNormal">
- Clustered index: The incoming data is page-compressed during merge</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 5: Partition merge and data compression</strong></div>
<div class="MsoNormal">
During a partition merge operation, the source partition and the destination partition are identified based on the partition function used. The example in Figure 9 illustrates the compression behavior of partition merge for LEFT and RIGHT partition functions.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig9.jpg" id="image010" src="http://i.msdn.microsoft.com/dynimg/IC298779.jpg" title="DataCompressionFig9.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 9: Data compression and partition manipulation</strong></div>
<div class="MsoNormal">
Some partitioning scenarios in large data warehouses dedicate an entire separate filegroup to each partition, so that individual partitions can be marked as read-only to minimize backup requirements. In this scenario, to avoid using DBCC SHRINKFILE, it is important that a partition is initially loaded as compressed, as discussed in Section 7. For heaps, this requires that the partition is bulk loaded using the TABLOCK hint, and for clustered indexes, it means that the compressed clustered index should be in place as the data is loaded, rather than created later, leaving unused empty space in the filegroup.</div>
<h1>
Data Compression and Transparent Data Encryption</h1>
<div class="MsoNormal">
Transparent data encryption (TDE) is another very useful feature in SQL Server 2008. TDE provides encryption of data in a database at the storage level without requiring any application changes. A common question related to this is “How does data compression perform against an encrypted database?”</div>
<div class="MsoNormal">
TDE is transparent to data compression. Figure 10 displays the amount of time it takes to page-compress a clustered index, and the amount of space savings obtained by page compression, with and without TDE. As illustrated in Figure 10, TDE has negligible, if any, impact on data compression in either compression time or space saved.</div>
<div class="MsoNormal">
<img alt="DataCompressionFig10.jpg" id="image011" src="http://i.msdn.microsoft.com/dynimg/IC298780.jpg" title="DataCompressionFig10.jpg" xmlns="" /></div>
<div class="MsoNormal">
<strong>Figure 10: Data compression with transparent data encryption</strong></div>
<div class="MsoNormal">
TDE encrypts the pages when they are written to disk and decrypts them when they are read from disk into memory. Because data compression (as well as decompression) is performed on in-memory pages, data compression always sees unencrypted data, and hence the effectiveness and efficiency of data compression is not impacted by TDE.</div>
<h1>
Conclusion</h1>
<div class="MsoNormal">
Data compression provides multiple benefits. It saves disk space, and it can help improve the performance of certain workloads. The benefits of data compression come at the cost of higher CPU usage for compressing and decompressing the data. Therefore, it is important to understand the workload characteristics on a table before deciding on a compression strategy. Data compression provides flexibility in terms of levels of compression (row or page) and the objects you can compress (table, index, partition). This enables fine-tuning the compression based on the characteristics of data and the workload. </div>
<div class="MsoNormal">
Another important advantage of data compression is that it works transparently to the application, and it works well with other SQL Server features, such as TDE and backup compression.</div>
<div class="MsoNormal">
The results shown in this white paper are based on the data and the hardware used in our tests. Your results will vary based on your own data, workload and hardware. Perform thorough testing when deciding what tables and indexes to compress.</div>
<div class="MsoNormal">
<strong>For more information:</strong></div>
<div class="MsoNormal">
<a href=""></a><a href="http://www.microsoft.com/sqlserver/"><span style="color: #1364c4;">http://www.microsoft.com/sqlserver/</span></a></a>: SQL Server Web site</div>
<div class="MsoNormal">
<a href=""></a><a href="http://technet.microsoft.com/en-us/sqlserver/"><span style="color: #1364c4;">http://technet.microsoft.com/en-us/sqlserver/</span></a></a>: SQL Server TechCenter </div>
<div class="MsoNormal">
<a href=""></a><a href="http://msdn.microsoft.com/en-us/sqlserver/"><span style="color: #1364c4;">http://msdn.microsoft.com/en-us/sqlserver/</span></a></a>: SQL Server DevCenter </div>
<div class="MsoNormal">
Did this paper help you? Please give us your feedback. Tell us on a scale of 1 (poor) to 5 (excellent), how would you rate this paper and why have you given it this rating? For example:</div>
<ul>
<li>Are you rating it high due to having good examples, excellent screen shots, clear writing, or another reason? </li>
<li>Are you rating it low due to poor examples, fuzzy screen shots, or unclear writing?</li>
</ul>
<div class="MsoNormal">
This feedback will help us improve the quality of white papers we release. </div>
<div class="MsoNormal">
<a href=""></a><a href="mailto:sqlbp@microsoft.com?subject=White Paper Feedback: Data Compression: Strategy, Capacity Planning, and Best Practices"><span style="color: #1364c4;">Send feedback</span></a></a>.</div>
<h1>
Appendix A: Test Hardware and Software</h1>
<div class="MsoNormal">
All the tests (except those in Figure 2 and Figure 3, which were run in customer test environments) were performed on the following hardware and software environment.</div>
<h2>
Server</h2>
<div class="MsoNormal">
DELL R805 with:</div>
<ul>
<li>2 socket quad core</li>
<li>AMD Opteron Processor 2354 @2.20 GHz</li>
<li>32 GB RAM</li>
</ul>
<h2>
Storage</h2>
<div class="MsoNormal">
EqualLogic iSCSI Storage</div>
<div class="MsoNoSpacing">
3 Disk shelves – Each Containing 14 SAS drives. Each drive had:</div>
<div class="MsoNoSpacing">
</div>
<ul>
<li>300 GB</li>
<li>15K rpm</li>
<li>RAID 1+0</li>
</ul>
<h2>
Software</h2>
<div class="MsoNoSpacing">
</div>
<ul>
<li>The 64-bit edition of the Windows Server 2008 Enterprise operating system</li>
<li>The 64-bit edition of SQL Server 2008 Enterprise</li>
</ul>
<h1>
Appendix B: Data Volume in Each Allocation Unit Type</h1>
<div class="MsoNormal">
A table or a partition can have three allocation units - <a href=""></a><a href="http://msdn.microsoft.com/en-us/library/ms189051.aspx"><span style="color: #1364c4;">IN_ROW_DATA, LOB_DATA and ROW_OVERFLOW_DATA</span></a></a>. Usually, most of the data in the table is stored in the <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms189087.aspx"><span style="color: #1364c4;">IN_ROW_DATA</span></a></a> allocation unit. Depending upon the row size and the table options, some data can be stored outside the row in <a href=""></a><a href="http://technet.microsoft.com/en-us/library/ms186981.aspx"><span style="color: #1364c4;">ROW_OVERFLOW_DATA</span></a></a> or LOB_DATA allocation units. Use the following script to determine how much data is stored in each of the three allocation units.</div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_56f8233c-8cf6-4d5b-b043-4c85225a3eee');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_56f8233c-8cf6-4d5b-b043-4c85225a3eee">
<div style="color: black;">
<pre>-- Provided AS IS, without warranty of any kind
SELECT OBJECT_NAME(p.object_id) AS Object_Name
, i.name AS Index_Name
, ps.in_row_used_page_count AS IN_ROW_DATA
, ps.row_overflow_used_page_count AS ROW_OVERFLOW_DATA
, ps.lob_used_page_count AS LOB_DATA
FROM sys.dm_db_partition_stats ps
JOIN sys.partitions p ON ps.partition_id = p.partition_id
JOIN sys.indexes i ON p.index_id = i.index_id AND p.object_id = i.object_id
WHERE OBJECTPROPERTY (p.[object_id], 'IsUserTable') = 1
</pre>
</div>
</div>
</div>
</div>
<h1>
Appendix C: Free Space in Database Files</h1>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_ecd8ffd0-db6d-4fa2-909d-701260dcd145');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_ecd8ffd0-db6d-4fa2-909d-701260dcd145">
<div style="color: black;">
<pre>--Provided AS IS, without warranty of any kind
SELECT
a.file_id,
LOGICAL_NAME = a.name,
PHYSICAL_FILENAME = a.physical_name,
FILEGROUP_NAME = b.name,
FILE_SIZE_MB = CONVERT(DECIMAL(12,2),ROUND(a.size/128.000,2)),
SPACE_USED_MB = CONVERT(DECIMAL(12,2),ROUND(FILEPROPERTY(a.name,'SpaceUsed')/128.000,2)),
FREE_SPACE_MB = CONVERT(DECIMAL(12,2),ROUND((a.size-FILEPROPERTY(a.name,'SpaceUsed'))/128.000,2))
FROM sys.database_files a LEFT OUTER JOIN sys.data_spaces b
ON a.data_space_id = b.data_space_id
</pre>
</div>
</div>
</div>
</div>
<h1>
Appendix D: On a Page-Compressed Index, Verifying That Nonleaf Pages are Row-Compressed</h1>
<div class="MsoNormal">
Use the following query on a page-compressed index (clustered or nonclustered) to verify that the leaf-level pages are page-compressed; but the nonleaf pages are row-compressed, not page-compressed.</div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_f6eac117-e575-4fbf-9ec6-5bfeea72f47a');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_f6eac117-e575-4fbf-9ec6-5bfeea72f47a">
<div style="color: black;">
<pre>SELECT
o.name, ips.index_type_desc, p.partition_number, p.data_compression_desc,
ips.index_level, ips.page_count, ips.compressed_page_count
FROM sys.dm_db_index_physical_stats
(DB_ID(), object_id(<insert index name here>), NULL, NULL, 'DETAILED') ips
JOIN sys.objects o ON o.object_id = ips.object_id
JOIN sys.partitions p ON p.object_id = o.object_id
ORDER BY ips.index_level
</pre>
</div>
</div>
</div>
</div>
<div class="MsoNormal">
The output of this query on a page-compressed clustered index looks like the following.</div>
<table class="MtpsTableHeadered"><tbody>
<tr><th>Name </th><th>index_type_desc </th><th>partition_number </th><th>data_compression_desc </th><th>index_level </th><th>page_count </th><th>compressed_page_count </th></tr>
<tr><td valign="top"><div class="MsoNormal">
TRADE_BULK</div>
</td><td valign="top"><div class="MsoNormal">
CLUSTERED INDEX</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td><td valign="top"><div class="MsoNormal">
370508</div>
</td><td valign="top"><div class="MsoNormal">
370502</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
TRADE_BULK</div>
</td><td valign="top"><div class="MsoNormal">
CLUSTERED INDEX</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
830</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
TRADE_BULK</div>
</td><td valign="top"><div class="MsoNormal">
CLUSTERED INDEX</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
2</div>
</td><td valign="top"><div class="MsoNormal">
5</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td></tr>
<tr><td valign="top"><div class="MsoNormal">
TRADE_BULK</div>
</td><td valign="top"><div class="MsoNormal">
CLUSTERED INDEX</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
3</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 6</strong></div>
<div class="MsoNormal">
Observe the columns index_level and compressed_page_count in the output. Note that almost all the leaf pages (index_level = 0) are page-compressed; but none of the nonleaf pages (index_level >=1) are page-compressed (compressed_page_count column is 0 for nonleaf level pages).</div>
<h1>
Appendix E: BULK INSERT into a Heap</h1>
<div class="MsoNormal">
The following query can be used to determine how many pages in a table, index, or partition are page-compressed.</div>
<div class="codeSnippetContainer" xmlns="http://www.w3.org/1999/xhtml">
<div class="codeSnippetContainerTabs">
<div class="codeSnippetContainerTab codeSnippetContainerTabSingle" dir="ltr">
<a href="">Transact-SQL</a></div>
</div>
<div class="codeSnippetContainerCodeContainer">
<div class="codeSnippetToolBar">
<div class="codeSnippetToolBarText">
<a href="javascript:CodeSnippet_CopyCode('CodeSnippetContainerCode_e230a7a6-314a-461f-aa09-e07af296b9e1');" name="CodeSnippetCopyLink" style="display: block;" title="Copy to clipboard.">Copy</a> </div>
</div>
<div class="codeSnippetContainerCode" dir="ltr" id="CodeSnippetContainerCode_e230a7a6-314a-461f-aa09-e07af296b9e1">
<div style="color: black;">
<pre>SELECT
o.name, ips.index_type_desc, p.partition_number, p.data_compression_desc,
ips.page_count, ips.compressed_page_count
FROM sys.dm_db_index_physical_stats
(DB_ID(), object_id(<insert table name here>), NULL, NULL, 'DETAILED') ips
JOIN sys.objects o ON o.object_id = ips.object_id
JOIN sys.partitions p ON p.object_id = o.object_id
</pre>
</div>
</div>
</div>
</div>
<div class="MsoNormal">
After performing BULK INSERT on a page-compressed heap, the output of the above query will look similar to the following.</div>
<table class="MtpsTableHeadered"><tbody>
<tr><th>name </th><th>index_type_desc </th><th>partition_number </th><th>data_compression_desc </th><th>page_count </th><th>compressed_page_count </th></tr>
<tr><td valign="top"><div class="MsoNormal">
TRADE_BULK</div>
</td><td valign="top"><div class="MsoNormal">
HEAP</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
501574</div>
</td><td valign="top"><div class="MsoNormal">
0</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 7</strong></div>
<div class="MsoNormal">
Note the columns data_compression_desc and compressed_page_count. The column data_compression_desc in sys.partitions shows the data compression setting (metadata) for a given table, index, or partition. To get the actual number of page-compressed pages, use the column compressed_page_count in the dynamic management function (DMF) sys.dm_db_index_physical_stats. Note that in this output, even though the data compression setting of the heap is PAGE, the newly loaded pages are not page-compressed.</div>
<div class="MsoNormal">
After BULK INSERT is performed with TABLOCK on a page-compressed heap, the output of this query will look similar to the following.</div>
<table class="MtpsTableHeadered"><tbody>
<tr><th>name </th><th>index_type_desc </th><th>partition_number </th><th>data_compression_desc </th><th>page_count </th><th>compressed_page_count </th></tr>
<tr><td valign="top"><div class="MsoNormal">
TRADE_BULK</div>
</td><td valign="top"><div class="MsoNormal">
HEAP</div>
</td><td valign="top"><div class="MsoNormal">
1</div>
</td><td valign="top"><div class="MsoNormal">
PAGE</div>
</td><td valign="top"><div class="MsoNormal">
370658</div>
</td><td valign="top"><div class="MsoNormal">
370656</div>
</td></tr>
</tbody></table>
<div class="MsoNormal">
<strong>Table 8</strong></div>
<div class="MsoNormal">
Note that almost all the pages are page-compressed. Remember to use the TABLOCK hint if you are loading data into a page-compressed heap, or if you are performing an INSERT … SELECT operation into a page-compressed heap. </div>
<div class="MsoNormal">
<strong>Note:</strong> The compressed_page_count column is displayed only when the DETAILED mode is used with the sys.dm_db_index_physical_stats DMF. When the LIMITED mode (the default) is used, the output of this column is NULL. Be careful when using the DETAILED mode, because it scans all the pages in the table, and it takes a significant amount of time on large tables. When you use the DETAILED mode, we recommended that you specify a value for object_id; do not specify NULL for this parameter. Specifying object_id as NULL (an invalid or nonexistent object reference to object_id translates to NULL) will scan all the pages in all the tables in the database, and it may significantly impact performance.</div>
</div>
</div>
</div>
ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-62585733276181983062012-03-07T08:47:00.001-08:002012-03-07T08:47:40.509-08:00GetElapsedTime from two DateTime2 values<div style="scroll: auto; background-color:white;"><pre style="color:black">
if object_id( 'dbo.GetElapsedTime' ) is not null drop function dbo.GetElapsedTime
go
create function dbo.GetElapsedTime
(
@Start DATETIME2(6),
@End DATETIME2(6)
)
RETURNS NVARCHAR(60)
AS
BEGIN
DECLARE
@years INT, @months INT, @days INT, @hours INT, @minutes INT, @seconds INT, @fractionalseconds INT, @temp DATETIME2(6), @return NVARCHAR(30),
@StartNS INT = CONVERT( INT, RIGHT( CONVERT( NVARCHAR(60), @Start, 121 ), 6 ) ),
@EndNS INT = CONVERT( INT, RIGHT( CONVERT( NVARCHAR(60), @End, 121 ), 6 ) )
SELECT @days = CASE WHEN DATEDIFF( hour, @Start, @End ) > 23 THEN DATEDIFF( day, @Start, @End ) ELSE 0 END; SELECT @temp = DATEADD( day, @days, @Start )
SELECT @hours = CASE WHEN DATEDIFF( minute, @temp, @End ) > 59 THEN DATEDIFF( hour, @temp, @End ) ELSE 0 END; SELECT @temp = DATEADD( hour, @hours, @temp )
SELECT @minutes = CASE WHEN DATEDIFF( second, @temp, @End ) > 59 THEN DATEDIFF( minute, @temp, @End ) ELSE 0 END; SELECT @temp = DATEADD( minute, @minutes, @temp )
SELECT @seconds = DATEDIFF( second, @temp, @End ) + CASE WHEN @StartNS > @EndNS THEN -1 ELSE 0 end ;
SELECT @fractionalseconds = CASE WHEN @StartNS > @EndNS THEN 1000000 - @StartNS + @EndNS ELSE @EndNS - @StartNS END
SELECT @return =
CASE WHEN @days > 0 then CONVERT( NVARCHAR, @days ) + N'd ' ELSE N'' END +
RIGHT( N'0' + CONVERT( NVARCHAR, @hours ), 2 ) + N':' +
RIGHT( N'0' + CONVERT( NVARCHAR, @minutes ), 2 ) + N':' +
RIGHT( N'0' + CONVERT( NVARCHAR, @seconds ), 2 ) + N'.' +
RIGHT( N'00000' + CONVERT( NVARCHAR, @fractionalseconds ), 6 )
RETURN @return
END
go
select Elapsed = dbo.GetElapsedTime( '2000-01-01 00:00:00.000000', '2000-12-31 23:59:59.999999' )
/*
Elapsed
------------------------------
365days 23:59:59.999999
*/
select Elapsed = dbo.GetElapsedTime( '2001-01-01 00:00:00.000000', '2001-12-31 23:59:59.999999' )
/*
Elapsed
------------------------------
364days 23:59:59.999999
*/
select Elapsed = dbo.GetElapsedTime( '2001-12-31 23:59:59.999999', '2002-01-01 00:00:00.000000' )
/*
Elapsed
------------------------------
00:00:00.000001
*/
select Elapsed = dbo.GetElapsedTime( '2002-01-01 00:00:00.000000', '2002-02-02 02:02:02.000002' )
/*
Elapsed
------------------------------
00:00:00.000001
*/
go
</pre>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-76730096282814376772011-12-15T16:34:00.000-08:002011-12-15T16:34:05.438-08:00CSS Best Practices<div class="scroll">
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<b>CSS Best practice</b></div>
<div class="MsoNormal">
</div>
<ul>
<li>Follow OOCSS (Object Oriented CSS), and DRY
(Don’t Repeat Yourself) principles</li>
<li>Classes should not be named with the actual
style it aims to display. That defeats the purpose of using separating
HTML for content and CSS for look and feel. You will have tied the HTML
to a specific look & feel.</li>
<ul>
<li>Eg.
class = ‘Blue-button’, or class = ‘width100’ are bad.</li>
<li>It
should be something like class = ‘button’, or class = ‘primary-button’, and the
colors and widths are put into the CSS.</li>
</ul>
<li>The class should be used to specify the type of
element it is.</li>
<ul>
<li>Eg.
Class = ‘search-result-row’ - all search result rows in the entire site
has this class.</li>
</ul>
<li>Objects or Identifiable Elements should be
identified with an ID, which differentiates them from the elements with the
same class.</li>
<ul>
<li>Eg.
ID = hotel-results or ID = flight-schedule-results, is the container that
differentiates the different elements of class search-result-row</li>
</ul>
</ul>
<br />
<div class="MsoNormal">
<b>Example 1:</b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
CSS:</div>
<div class="MsoNormal">
.header {width,font,etc}</div>
<div class="MsoNormal">
.nav-button {style common across nav-button in header and
footer}</div>
<div class="MsoNormal">
#header-nav .nav-button {overrides for header .nav-button}</div>
<div class="MsoNormal">
#footer-nav .nav-button {overrides for footer.nav-button}</div>
<div class="MsoNormal">
.nav-button.selected {override for .nav-button for selected
button}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
HTML:</div>
<div class="MsoNormal">
<div ID=’header’></div>
<div class="MsoNormal" style="text-indent: .5in;">
<ul ID=’header-nav’
class=’navbar’></div>
<div class="MsoNormal" style="margin-left: .5in; text-indent: .5in;">
<li
ID=’nav-home’ class=’nav-button selected’>Home</li></div>
<div class="MsoNormal" style="margin-left: .5in; text-indent: .5in;">
<li
ID=’nav-hotel’ class=’nav-button’>Hotel</li></div>
<div class="MsoNormal" style="margin-left: .5in; text-indent: .5in;">
<li
ID=’nav-flight-schedule’ class=’nav-button’>Flight Schedules</li></div>
<div class="MsoNormal" style="text-indent: .5in;">
</ul></div>
<div class="MsoNormal">
</div></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Example 2:<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
CSS:</div>
<div class="MsoNormal">
.search-results {styles for all search results lists in the
site}</div>
<div class="MsoNormal">
.search-result-row {style for all search results rows in the
site}</div>
<div class="MsoNormal">
#hotel-results .search-results {override for hotel specific
search result}</div>
<div class="MsoNormal">
#flight-schedule-results .search-results {override for
flight schedule specific search result}</div>
<div class="MsoNormal">
#hotel-result-1 .search-result-row {override for first row
of hotel results}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
HTML:</div>
<div class="MsoNormal">
<div ID=’hotel-results’ class=’search-results’></div>
<div class="MsoNormal">
<div ID=’hotel-result-1’ class=’search-result-row’></div>
<div class="MsoNormal">
<span class=’vendor’>Silver Cloud</span></div>
<div class="MsoNormal">
<span class=’price’>$100</span></div>
<div class="MsoNormal">
</div></div>
<div class="MsoNormal">
<div></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<div ID=’flight-schedule-results’
class=’search-results’></div>
<div class="MsoNormal">
<div ID=’flight-schedule-result-1’ class=’search-result-row’></div>
<div class="MsoNormal">
<span class=’vendor’>American Airlines</span></div>
<div class="MsoNormal">
<span class=’departure-time’>11:11 am</span></div>
<div class="MsoNormal">
<span class=’arrival-time’>12:12 pm</span></div>
<div class="MsoNormal">
</div></div>
<div class="MsoNormal">
<div></div>
<br />
<div class="’search-results’" id="’hotel-results’">
<div>
<div class="’search-results’" id="’flight-schedule-results’">
<div>
</div>
</div>
</div>
</div>
</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0tag:blogger.com,1999:blog-1725372511091419934.post-46135548373716470312011-11-03T16:23:00.000-07:002011-11-03T16:42:46.458-07:00Dynamic Search Conditions in T-SQL<div style="background-color: white;">
<a href="http://www.sommarskog.se/dyn-search-2008.html" target="_blank">Full Article</a><br />
<span style="font-size: small;"></span><br />
<h1 class="style1">
<span style="color: black;">Dynamic Search Conditions in <nobr>T-SQL</nobr></span><small><br /><span style="color: black;">Version for SQL 2008 (SP1 CU5 and later)</span></small></h1>
<small><span style="color: black;">An SQL text by </span><a href="http://www.sommarskog.se/index.html"><span style="color: black;">Erland Sommarskog</span></a><span style="color: black;">, SQL Server MVP. </span><a href="http://www.sommarskog.se/dyn-search-2008.html#revision"><span style="color: black;">Most recent update</span></a><span style="color: black;"> 2011-08-26.</span></small><br />
<h2>
<a href="http://draft.blogger.com/" name="introduction"><span style="color: black;">Introduction</span></a></h2>
<div style="border-bottom: red 3px solid; border-left: red 3px solid; border-right: red 3px solid; border-top: red 3px solid;">
<b><span style="font-size: small;"><span style="color: black;"><small class="allcaps">CAUTION</small>! This article does not apply to all versions of <small class="allcaps">SQL</small> 2008, only to <small class="allcaps">SQL</small> 2008 SP1 CU5 (10.0.2746) and <small class="allcaps">SQL</small> 2008 R2 CU1 (10.50.1702) and later. See the section <i><a href="http://www.sommarskog.se/dyn-search-2008.html#SPandCUs">A Tale of Service Packs and Cumulative Updates</a></i> for more details.</span></span></b></div>
<span style="color: black;">A very common requirement in an information system is to have one or more functions where the users are able to search the data by selecting freely among many possible criterias. This is a tough challenge, because not only must you produce the desired output, but you must also keep the response time within acceptable limits, at least for common searches. And on top of all, the code must be maintainable, so that you easily can modify it to meet new needs and requirements.<br />There are two ways to attack this problem: dynamic <span style="font-size: small;"><small class="allcaps">SQL</small> and static <small class="allcaps">SQL</small>. Up to <small class="allcaps">SQL</small> 2005, it was difficult to find solutions for static <small class="allcaps">SQL</small> that were simple to write and maintain and yet performed well, and the recommendation was to use dynamic <small class="allcaps">SQL</small>. In <small class="allcaps">SQL</small> 2008, things changed. Microsoft changed the hint <small class="allcaps">OPTION(RECOMPILE)</small> so it now works as you would expect. However, there was a serious bug in the original implementation, and you need at least CU5 of <small class="allcaps">SQL</small> 2008 SP1 or <small class="allcaps">SQL</small> 2008 SP2 to benefit from this feature. </span><br />Although, as we shall see, a solution with static <span style="font-size: small;"><small class="allcaps">SQL</small> is in one sense more dynamic than dynamic <small class="allcaps">SQL</small> itself. There are still some performance implications, and a properly written solution with dynamic <small class="allcaps">SQL</small> can still be the best choice when you expect many concurrent searches. Dynamic <small class="allcaps">SQL</small> also remains the best choice when you need to support very complex search options.</span><br />This article exists in two versions. This version is for <span style="font-size: small;"><small class="allcaps">SQL</small> 2008 SP1 CU5 and later. The other version is </span></span><a href="http://www.sommarskog.se/dyn-search-2005.html"><span style="color: black;">for <span style="font-size: small;"><small class="allcaps">SQL</small> 2005 and earlier</span></span></a><span style="color: black;"> as well for <span style="font-size: small;"><small class="allcaps">SQL</small> 2008 SP1 up to CU5. That version includes various tricks to deal with the performance problems of static <small class="allcaps">SQL</small> solutions that no longer are an issue with <small class="allcaps">SQL</small> 2008. Therefore, I have not included these tricks in this version.</span><br />In this text, I first look at a fairly common simple case of dynamic search conditions, that I've called "alternate key lookup" where the more general methods shoot over the target. I then introduce a typical problem of general dynamic search conditions that serves as a case study when I later discuss the solutions for static and dynamic <span style="font-size: small;"><small class="allcaps">SQL</small> in detail.</span></span>...</div>ReelTymhttp://www.blogger.com/profile/02312843030533325761noreply@blogger.com0