Press Release Harrisburg, PA – Today, Governor Tom Wolf announced that R.G. Coating LLC, a hot dip galvanizing company, will construct a new galvanizing facility in Lawrence County. The project is expected to create 65 manufacturing jobs at the site in Pulaski Township.“We’re proud that R.G. has selected Pennsylvania as the best place to grow the business,” said Governor Wolf. “Any time a manufacturer puts down roots here in the commonwealth, it creates family-sustaining jobs, boosts our manufacturing sector, and strengthens our economy.R.G. Coating will construct a new, 50,000-square-foot facility and equip it with state-of-the-art galvanizing equipment. R.G. Coating is a new, sister company to R.G. Steel, which specializes in the fabrication of highway guiderail and safety systems, but currently needs to outsource all of its galvanizing services. The new facility will enable the company to bring the galvanization process in-house so its products can be delivered to market quickly and efficiently, allowing for strong future growth. The facility will be located in Pulaski Township next to the R.G. Steel facility. R.G. Coating plans to invest at least $13.6 million into the project, which is expected to create 65 jobs and retain 25 jobs over the next three years.“As R.G. Steel Corp. is poised for growth, the addition of R.G. Coating will jump start that growth,” said David Price, president of R.G. Steel. “That growth is supported by both the Governor’s Action Team and the Lawrence County Economic Development Corporation, both of whom were instrumental in providing us with the assistance needed to remain in Lawrence County for many years to come. It has been, and will continue to be, a pleasure working with them both.”R.G. Coating received a funding proposal from the Department of Community and Economic Development for a $200,000 Pennsylvania First grant, $130,000 in job creation tax credits to be distributed upon the creation of new jobs, and a $29,250 workforce development grant to help the company train its workers. R.G. Coating was also encouraged to apply for a low-interest $3.25 million loan from the Pennsylvania Industrial Development Authority to assist with building and equipment costs. The project was coordinated by the Governor’s Action Team, an experienced group of economic development professionals who report directly to the governor and work with businesses that are considering locating or expanding in Pennsylvania, with additional coordination provided through the Lawrence County Economic Development Corporation (LCEDC).“Lawrence County continues to be a community that manufacturers call home,” said Linda Nitch, executive director of business development at LCEDC. “R.G.’s decision to expand its operations in Lawrence County by constructing a new galvanizing facility shows the strength of heavy industry in our western Pennsylvania county. Through the efforts of the company, the LCEDC and the Governor’s Action Team, new jobs will be created by R.G. in the coming years. We are proud to partner with R.G. Steel and the Commonwealth of Pennsylvania to make this project a reality.”R.G. Coating and R.G. Steel is a fully integrated guiderail/guardrail products producer and supplier. As a certified steel fabricator, the company is capable of providing a wide variety of products from highway guiderail/guardrail to custom fabricated structural steel that meet meeting federal and state department of transportation specifications.For more information about the Governor’s Action Team, visit dced.pa.gov, and be sure to stay up-to-date with all of our agency news on Facebook, Twitter, and LinkedIn. May 21, 2019 SHARE Email Facebook Twitter Governor Wolf Announces R.G. Coating to Establish New Galvanizing Facility, Creating 65 Manufacturing Jobs in Lawrence County
25 June 2003They’re strong, beautiful and breathtaking to watch. They’re the Lipizzaner horses, originally bred in Austria, and Johannesburg is the only place outside Europe where you can see them.The Lipizzaner horses, based in Kyalami in Midrand, have it all – strength, beauty, presence, Roman ancestry, military discipline – and the best thing is that Johannesburg residents and visitors can see a whole stableful of them in a show that can be seen in only one other country in the world, Austria.Lipizzaners are large, powerfully built creatures that radiate energy and stamina, with pure white coats. And every Sunday they do a classical dressage show to classical music in which they skip, trot on the spot, side-step, high-step, and jump off the ground and kick with their back legs at the same time – an act that was meant to decapitate enemies in war situations. To see six horses going through the routine together is breathtaking.The horses are born dark-coloured and gradually lose their colour, becoming white by the time they are ready to perform. The Kyalami stable has one black horse, Conversano Pablo, a beauty, who is 18 years old and still performing. The black gene surfaces in one of every 400 horses.Cavalry horsesThe Lipizzaners were originally cavalry horses, tracing their ancestry back to the first trained horses in Roman times, and more recently, to 1580. when the Lipizzaner breed was created by Charles, Archduke of Austria.Charles imported nine Spanish stallions and 23 mares and established his imperial stables at Lipica (in present-day Slovenia), which became the oldest riding school in the world, known as the Spanish Riding School, now based in Vienna. He bred them for their strength and courage, and supplied them to the royal court.The South African Lipizzaners are recognised by and affiliated to the Spanish Riding School, and riders from Austria come over occasionally to work with the local horses.In 1944 several Lipizzaners were rescued from war-torn Austria and brought to South Africa by Count Jankovich-Besan. He established a breeding farm in KwaZulu-Natal, and the stallions on show at Kyalami are the descendants of these Austrian horses.The mares are not considered to have the same presence as the stallions, and are kept for breeding.The horses are still bred in KwaZulu-Natal, and at the age of three the stallions are brought to Kyalami to begin their intensive training, which takes up to five years to get the horses to a junior level, and starts with an introduction to the saddle and bridle.Because of their strength and stamina, the horses may still be performing at the age of 25.There are 25 horses at the Kyalami stables, trained and ridden by nine women, who in the words of one of them, Janine Ross (19), have “lots of dedication and love for the horses”. When asked whether the horses enjoy the shows, Ross is unequivocal: “Definitely, they love showing off.”Source: City of Johannesburg website
30 June 2010 South African National Police Commissioner Bheki Cele is committed to making sure that the 2010 Fifa World Cup™ continues to be a safe one as the tournament enters the final phases. “This is a demanding but intriguing period in the history of this country,” Cele said this week. “And undoubtedly up to now, actions are speaking louder than words. Our success can be attributed to the security plan that is now proving to be a winning one.” While many teams have been sent home, there are still plenty of fans routing for their team, with many more arriving on a daily basis. “With numbers increasing as we are approaching the end of tournament. This leaves us with a mammoth task until the final whistle,” Cele said. Since the beginning of the tournament a Joint Operational Committee has been meeting on a daily basis to ensure that security measures are adequately deployed. With a staff complement of over 44 000 police members dedicated to the tournament, support from the South African Defence Force, Interpol and respective competing nation’s police services, the host nation has taken security seriously. “There are 225 foreign police officials based here in Pretoria,” said Cele. “They are here in an advisory capacity to assist South African security agencies to have a better understanding of how fans from various countries behave.” There have been a few minor incidents, which can be expected during a massive gathering of people such as the Fifa Word Cup™. However, the South African police have dealt with these efficiently. “World Cup security and normal policing are equally important, hence none was compromised,” said Cele. “Instead, our men and woman in blue went beyond the call of duty.” The rate of investigations, arrests and prosecutions around tournament incidents has been increased, and Cele feels that this improved service will continue long after the tournament is over. “The money, the training and the methodology are going to stay with the South African Police Service. We are now capable of continuing at this same pace after the World Cup. We must keep this momentum up for the benefit of the country. “We are going to work hard for the last 10 matches,” Cele said. “We have re-committed ourselves to carry out our duties with diligence and pride, this we owe to South Africa, the African continent and the world.” Source: 2010 Fifa World Cup South Africa Organising Committee
Share Facebook Twitter Google + LinkedIn Pinterest WhatFarm Science Review 2019 offers the latest in farm technology and products.The three-day agricultural trade show offers educational talks and opportunities to speak one-on-one with experts from The Ohio State University College of Food, Agricultural, and Environmental Sciences (CFAES), which sponsors the annual event at the Molly Caren Agricultural Center near London.Now in its 57th year, the event offers the most relevant and up-to-date information to farmers on topics ranging from crop diseases to soil health. Farmers can learn how to reduce input costs and increase their efficiency at a time when both are particularly crucial.In one location, growers can visit with many experts and see the newest innovations on the market. The event draws more than 100,000 people throughout three days. It features 4,000 product lines and over 700 commercial and educational exhibits, as well as workshops and presentations delivered by CFAES experts.Special guest Jolene Brown will speak Sept. 18 at 1 p.m. and Sept. 19 at 10 a.m. She addresses tough farm issues with grace and humor and is frequently hired to address farmers on a variety of topics, including stress and mental health.Ohio Farm Bureau at the ReviewBe sure to stop by the Ohio Farm Bureau building at the corner of Beef Street and Friday Avenue. Along with giving away apples to visitors, Farm Bureau staff will be on hand to answer questions about membership, Farm Bureau Health Benefits Plan, Energy Program, as well as policy initiatives and law changes at the state and federal level.Anyone who renews or purchases a membership at Farm Science Review will receive an official 12×12 metal “Ohio Farm Bureau member” sign, while supplies last.Make sure to enter the Ford F150 Truck Sweepstakes, the Ohio Farm Bureau Energy Program Sweepstakes (four $250 prizes), and the Rocky Brands boot giveaway.Event detailsThe Farm Science Review hours are 8 a.m. to 5 p.m. from Sept 17–18 and 8 a.m. to 4 p.m. on Sept. 19. Tickets for the event are $7 online and at Ohio State University Extension county offices and participating agribusinesses, or $10 at the gate. Children ages 5 and under are free.The Farm Science Review app, which will be available for both Apple and Android smartphone and tablet users, offers interactive maps, a schedule of events and general information about the show and exhibitors. It will be available by download from the Apple App Store and the Google Play Store by searching for “FSR 2019” or on the Farm Science Review website.
Add Your Composition to the Render QueueFirst off, check to see if your composition is playing correctly. If everything looks right, go to the top menu and select Composition > Add to Render Queue. Think of the Render Queue as a line that your compositions wait in to get exported. In a program like After Effects, when you start working with multiple compositions at a time, a queue can make the exporting process much easier. But for this one, all you have to do is add your single composition.Adjusting Your SettingsOnce you’ve reached the render queue, you’re going to see your project lined up inside the window. This window will give you three options to choose from: Render Settings, Output Module, and Output To.The Render Settings is where you can change the quality settings of your video. If you need to change the frame rate of your project to fit the frame rate of a video in Premiere, you can change those settings here. If all of these options look like a foreign language to you, don’t worry — After Effects will automatically default to the best settings.The Output Module is where you will do most of the heavy lifting. This is where you will adjust your composition’s format, codec, and channels. For your composition’s format, I recommend keeping it in QuickTime. It’s the most accessible format for most projects, so unless you specifically need to export in a different one, stick with QuickTime.For your project’s codec, click the “Format Options” button, and a new window will pop up. Here, you will see a dropdown menu of all the codecs to choose from. The Animation codec is tried and true, but you can experiment with others such as Apple Pro Res if you want to get a higher-quality render.The channel where your project gets exported is one of the most important parts of this list, and it’s often a challenge for first-time After Effects users. If your composition is a full-fledged animation that you aren’t going to place over a video, then select the RGB option. This will export your composition with the background intact.However, if you’re exporting something that you are going to place over video, such as a lower third or a logo animation, then you need to select RGB + Alpha. This will make your background transparent, so that you can place the rendered product over a video.Finally, choose your file location in the “Output To” settings tab. Once you’ve done that, click the “Render” button on the right side of the screen, and boom! You’re finished! Not as hard as it seems, right?After Effects may be tricky at first, but once you get your bearings, you will be firing off animations like a Wild West gunslinger. Best of luck in your new frontier, cowboy.Looking for more on After Effects? Check out these articles.3 Typography Motion Graphics Tips | After Effects TutorialCreate An Animated Website Presentation Using After EffectsVideo Tutorial: Animate a 2D Mobile Device with After EffectsUnderstanding Keyframe Interpolation in Adobe After Effects5 Ways To Create A Background in After Effects When you’re just getting started in After Effects, the program can be daunting. Here’s a quick guide to exporting your project.Everyone who has used After Effects before knows the pain of trying to navigate the software for the first time. I know for me it took a few days and countless YouTube tutorials. Since the program is so entirely different than other creative programs, it can take some getting used to.Once you’ve finally finished your first project, getting the composition out of After Effects isn’t as easy as clicking File > Export. Luckily, our friends at Shutterstock have made an extremely easy-to-follow guide to finishing that first project. Let’s get started!
2/2 I have watched the fight 2 many times & believe I should have stopped the fight 2 punches earlier. But I don’t get 2nd chances #AskBJM https://t.co/Qn1dQ4oP8c— Big John McCarthy (@JohnMcCarthyMMA) July 31, 2017Although he failed to avenge his earlier loss to Jones, Cormier pocketed a disclosed $1 million in fight purse, according to MMA Fighting. /ra Don’t miss out on the latest news and information. Lacson: SEA Games fund put in foundation like ‘Napoles case’ FEU Auditorium’s 70th year celebrated with FEU Theater Guild’s ‘The Dreamweavers’ View comments McCarthy, meanwhile, accepted the apology and aired his side on Twitter.1/2 @dc_mma U have nothing to apologize for. You have been an incredible champion who has represented the sport of MMA with class & dignity— Big John McCarthy (@JohnMcCarthyMMA) July 31, 2017 UFC 214 over the weekend marked the end of a long rivalry between two of the promotion’s top light heavyweight fighters, Daniel Cormier and Jon Jones.FEATURED STORIESSPORTSSEA Games: Biñan football stadium stands out in preparedness, completionSPORTSPrivate companies step in to help SEA Games hostingSPORTSWin or don’t eat: the Philippines’ poverty-driven, world-beating pool starsThe action-packed five-round battle ended in three rounds, with Jones viciously knocking out Cormier with a head kick and a barrage of strikes, en route to reclaiming the UFC light heavyweight title.ADVERTISEMENT Ethel Booba on hotel’s clarification that ‘kikiam’ is ‘chicken sausage’: ‘Kung di pa pansinin, baka isipin nila ok lang’ Sports Related Videospowered by AdSparcRead Next National Coffee Research Development and Extension Center brews the 2nd National Coffee Education Congress A day after losing his title, the 38-year-old Cormier took to Instagram to congratulate his bitter rival for his convincing victory.“First off, thank you all for the kind words. I have felt the support. Congratulations to Jon Jones and his team. They did a phenomenal job and got the victory,” he captioned a photo of himself.The former Olympic wrestler also apologized to veteran MMA referee Jon McCarthy for initially protesting against his decision to halt the fight.“Also, to Big John McCarthy, I would like to apologize for acting up with you. I am thankful for the time you gave me to try and defend myself and stay in the fight,” he wrote.“You are the best in the business for a reason. I also wanna thank my team and my coaches. I love you all from the bottom of my heart. Your time and energy is greatly appreciated.”ADVERTISEMENT Church, environmentalists ask DENR to revoke ECC of Quezon province coal plant PH’s 1st full Ironman race set next year Robredo should’ve resigned as drug czar after lack of trust issue – Panelo READ: Jones regains UFC belt with brutal KO of Cormier, wants Lesnar next MOST READ DILG, PNP back suspension of classes during SEA Games Trump strips away truth with hunky topless photo tweet LATEST STORIES Robredo: True leaders perform well despite having ‘uninspiring’ boss PLAY LIST 02:49Robredo: True leaders perform well despite having ‘uninspiring’ boss02:42PH underwater hockey team aims to make waves in SEA Games01:44Philippines marks anniversary of massacre with calls for justice01:19Fire erupts in Barangay Tatalon in Quezon City01:07Trump talks impeachment while meeting NCAA athletes02:49World-class track facilities installed at NCC for SEA Games
To bring awareness to dating violence, an epidemic that impacts one in three young people today, American actress, singer and rising star Debby Ryan is partnering with global cosmetics giant Mary Kay as the company’s newest cause champion.Debby Ryan lends her voice to Mary Kay’s Don’t Look Away campaign to help prevent and end dating abuseKnown for her starring role as television’s “Jessie,” Ryan will travel the country to help educate teens and young adults on healthy relationships, how to recognize the signs of dating abuse and raise awareness of support services.Ryan will also serve as the spokesperson for Mary Kay’s Don’t Look Away campaign to help prevent and end dating abuse. The program includes the nation’s first-ever text-for-help service powered by loveisrespect that provides safe and anonymous advice to tens of thousands of young people each year via text. Simply by texting “love is” to 22522, teens and young adults can receive help from trained peer advocates anytime, anywhere.“It’s horrifying to know how many young people deal with abusive relationships and how much goes unmentioned,” said Ryan. “I know firsthand how alone you can feel when you’re being broken down in a relationship and forced to defend it or stay silent. Just being able to send a text message is anonymous and safe. Mary Kay and I believe that everyone deserves a safe, healthy relationship that makes you stronger and better and I want to make sure people know how to get the help they need.”According to the most recent Truth About Abuse Survey conducted by Mary Kay, 73 percent of teens and young adults experienced emotional abuse in their dating relationship and 40 percent never talked to anyone about the abusive behavior. As a Mary Kay Cause Champion, Ryan will lend her voice to the company’s steadfast commitment to put an end to these alarming statistics and eradicate dating violence.“As a corporate leader in preventing and ending violence against women, Mary Kay is educating young people across the country on how and where to get help before relationships become unhealthy and potentially violent,” said Crayton Webb, Vice President of Corporate Communications and Corporate Social Responsibility at Mary Kay Inc. “Debby Ryan is one of the most well-known rising stars in the entertainment business today. By joining forces with Debby, we know our collective voice will reach thousands of young people and help end dating abuse among the next generation before it ever begins.”For more information about Mary Kay’s Don’t Look Away program, visit marykay.com/dontlookaway.
Vadim Vasilyev, Vice President of AS Monaco, has urged the team to step up their game after the draw 2-2 against Dijon.Thierry Henry’s men could only manage a draw which means he is still waiting for a win in a competitive game as the manager of AS Monaco.“It is not enough. Especially what I saw in the first 60 minutes. We are in danger. It is not because the club is called AS Monaco that we will get out of this situation. It is by the awareness of the seriousness of this situation, individual but also collective, and a reaction is needed, by the work and by the state of mind.”Top 5 Ligue 1 players to watch throughout next weekend Tomás Pavel Ibarra Meda – September 11, 2019 With the international activity cooling down for the next month, we go back to the Top 5 players to watch in Ligue 1 next…“I am aware of the situation he told the club website. We work in good conditions.“We are all very well paid and we are all here because we want to move this club forward. I ask everyone, not just the players present tonight, but the whole group to be aware of the seriousness of the situation and make every effort to improve.”“We will rely on players who have the desire and pride to wear the colors of the Red and White. This is not our place, we have no excuses. This club deserves a lot better and it is our duty to improve for the club. “
In this tutorial, we will create solutions to design indexes to help us improve query performance of Teradata database management system. This article is an excerpt from a book co-authored by Abhinav Khandelwal and Rajsekhar Bhamidipati titled Teradata Cookbook. This book will teach you to tackle problems related to efficient querying, stored procedure searching, and navigation techniques in a Teradata database. Creating a partitioned primary index to improve performance A PPI (partitioned primary index) is a type of index that enables users to set up databases that provide performance benefits from a data locality, while retaining the benefits of scalability inherent in the hash architecture of the Teradata database. This is achieved by hashing rows to different virtual AMPs, as is done with a normal PI, but also by creating local partitions within each virtual AMP. We will see how PPIs will improve the performance of a query. Getting ready You need to connect to the Teradata database. Let’s create a table and insert data into it using the following DDL. This will be a non-partitioned table, as follows: /*NON PPI TABLE DDL*/CREATE volatile TABLE EMP_SAL_NONPPI(id INT,Sal INT,dob DATE,o_total INT) primary index( id) on commit preserve rows;INSERT into EMP_SAL_NONPPI VALUES (1001,2500,’2017-09-01′,890);INSERT into EMP_SAL_NONPPI VALUES (1002,5500,’2017-09-10′,890);INSERT into EMP_SAL_NONPPI VALUES (1003,500,’2017-09-02′,890);INSERT into EMP_SAL_NONPPI VALUES (1004,54500,’2017-09-05′,890);INSERT into EMP_SAL_NONPPI VALUES (1005,900,’2017-09-23′,890);INSERT into EMP_SAL_NONPPI VALUES (1006,8900,’2017-08-03′,890);INSERT into EMP_SAL_NONPPI VALUES (1007,8200,’2017-08-21′,890);INSERT into EMP_SAL_NONPPI VALUES (1008,6200,’2017-08-06′,890);INSERT into EMP_SAL_NONPPI VALUES (1009,2300,’2017-08-12′,890);INSERT into EMP_SAL_NONPPI VALUES (1010,9200,’2017-08-15′,890); Let’s check the explain plan of the following query; we are selecting data based on the DOB column using the following code: /*Select on NONPPI table*/SELECT * from EMP_SAL_NONPPIwhere dob Following is the snippet from SQLA showing explain plan of the query: As seen in the following explain plan, an all-rows scan can be costly in terms of CPU and I/O if the table has millions of rows: Explain SELECT * from EMP_SAL_NONPPIwhere dob The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 0.04 seconds. Let’s see how we can enable partition retrieval in the same query. How to do it… Connect to the Teradata database using SQLA or Studio. Create the following table with the data. We will define a PPI on the column DOB:/*Partition table*/CREATE volatile TABLE EMP_SAL_PPI(id INT,Sal int,dob date,o_total int) primary index( id)PARTITION BY RANGE_N (dob BETWEEN DATE ‘2017-01-01’AND DATE ‘2017-12-01’ EACH INTERVAL ‘1’ DAY)on commit preserve rows;INSERT into EMP_SAL_PPI VALUES (1001,2500,’2017-09-01′,890);INSERT into EMP_SAL_PPI VALUES (1002,5500,’2017-09-10′,890);INSERT into EMP_SAL_PPI VALUES (1003,500,’2017-09-02′,890);INSERT into EMP_SAL_PPI VALUES (1004,54500,’2017-09-05′,890);INSERT into EMP_SAL_PPI VALUES (1005,900,’2017-09-23′,890);INSERT into EMP_SAL_PPI VALUES (1006,8900,’2017-08-03′,890);INSERT into EMP_SAL_PPI VALUES (1007,8200,’2017-08-21′,890);INSERT into EMP_SAL_PPI VALUES (1008,6200,’2017-08-06′,890);INSERT into EMP_SAL_PPI VALUES (1009,2300,’2017-08-12′,890);INSERT into EMP_SAL_PPI VALUES (1010,9200,’2017-08-15′,890); Let’s execute the same query on a new partition table: /*SELECT on PPI table*/sel * from EMP_SAL_PPIwhere dob Following snippet from SQLA shows query and explain plan of the query: The data is being accessed using only a single partition, as shown in the following block: /*EXPLAIN PLAN*/1) First, we do an all-AMPs RETRIEVE step from a single partitionofSYSDBA.EMP_SAL_PPI with a condition of(“SYSDBA.EMP_SAL_PPI.dob =DATE ‘2017-08-01′”) with a residual condition of (“SYSDBA.EMP_SAL_PPI.dob = DATE ‘2017-08-01′”) into Spool 1(group_amps), which is built locally on the AMPs. The size ofSpool 1 is estimated with no confidence to be 1 row (37bytes).The estimated time for this step is 0.04 seconds. -> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 0.04 seconds. How it works… A partitioned PI helps in improving the performance of a query by avoiding a full table scan elimination. A PPI works the same as a primary index for data distribution, but creates partitions according to ranges or cases, as specified in the table. There are four types of PPI that can be created in a table: Case partitioning: /*CASE partition*/CREATE TABLE SALES_CASEPPI(ORDER_ID INTEGER,CUST_ID INTERGER,ORDER_DT DATE,)PRIMARY INDEX(ORDER_ID)PARTITION BY CASE_N(ORDER_ID Range-based partitioning: /*Range Partition table*/CREATE volatile TABLE EMP_SAL_PPI(id INT,Sal int,dob date,o_total int) primary index( id)PARTITION BY RANGE_N (dob BETWEEN DATE ‘2017-01-01’AND DATE ‘2017-12-01’ EACH INTERVAL ‘1’ DAY)on commit preserve rows Multi-level partitioning: CREATE TABLE SALES_MLPPI_TABLE(ORDER_ID INTEGER NOT NULL,CUST_ID INTERGER,ORDER_DT DATE,)PRIMARY INDEX(ORDER_ID)PARTITION BY (RANGE_N(ORDER_DT BETWEEN DATE ‘2017-08-01’ AND DATE’2017-12-31’EACH INTERVAL ‘1’ DAY)CASE_N (ORDER_ID Character-based partitioning: /*CHAR Partition*/CREATE TABLE SALES_CHAR_PPI (ORDR_ID INTEGER,EMP_NAME VARCHAR (30) CHARACTER,PRIMARY INDEX (ORDR_ID)PARTITION BY CASE_N (EMP_NAME LIKE ‘A%’, EMP_NAME LIKE ‘B%’,EMP_NAME LIKE ‘C%’, EMP_NAME LIKE ‘D%’,EMP_NAME LIKE ‘E%’, EMP_NAME LIKE ‘F%’,NO CASE, UNKNOWN); PPI not only helps in improving the performance of queries, but also helps in table maintenance. But there are certain performance considerations that you might need to keep in mind when creating a PPI on a table, and they are: If partition column criteria is not present in the WHERE clause while selecting primary indexes, it can slow the query The partitioning of the column must be carefully chosen in order to gain maximum benefits Drop unneeded secondary indexes or value-ordered join indexes Creating a join index to improve performance A join index is a data structure that contains data from one or more tables, with or without aggregation: In this, we will see how join indexes help in improving the performance of queries. Getting ready You need to connect to the Teradata database using SQLA or Studio. Let’s create a table and insert the following code into it: CREATE TABLE td_cookbook.EMP_SAL(id INT,DEPT varchar(25),emp_Fname varchar(25),emp_Lname varchar(25),emp_Mname varchar(25),status INT)primary index(id);INSERT into td_cookbook.EMP_SAL VALUES (1,’HR’,’Anikta’,’lal’,’kumar’,1);INSERT into td_cookbook.EMP_SAL VALUES (2,’HR’,’Anik’,’kumar’,’kumar’,2);INSERT into td_cookbook.EMP_SAL VALUES (3,’IT’,’Arjun’,’sharma’,’lal’,1);INSERT into td_cookbook.EMP_SAL VALUES (4,’SALES’,’Billa’,’Suti’,’raj’,2);INSERT into td_cookbook.EMP_SAL VALUES (4,’IT’,’Koyd’,’Loud’,’harlod’,1);INSERT into td_cookbook.EMP_SAL VALUES (2,’HR’,’Harlod’,’lal’,’kumar’,1); Further, we will create a single table join index with a different primary index of the table. How to do it… The following are the steps to create a join index to improve performance: Connect to the Teradata database using SQLA or Studio. Check the explain plan for the following query: /*SELECT on base table*/EXPLAIN SELECT id,dept,emp_Fname,emp_Lname,status fromtd_cookbook.EMP_SALwhere id=4;1) First, we do a single-AMP RETRIEVE step from td_cookbook.EMP_SAL by way of the primary index “td_cookbook.EMP_SAL.id = 4” with no residual conditions into Spool 1 (one-amp), which is built locally on that AMP. The size of Spool 1 is estimated with low confidence to be 2 rows (118 bytes). The estimated time for this step is 0.02 seconds.-> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 0.02 seconds. Query with a WHERE clause on id; then the system will query the EMP table using the primary index of the base table, which is id. Now, if a user wants to query a table on column emp_Fname, an all row scan will occur, which will degrade the performance of the query, as shown in the following screenshot: Now, we will create a JOIN INDEX using emp_Fname as the primary index: /*Join Index*/CREATE JOIN INDEX td_cookbook.EMP_JIASSELECT id,emp_Fname,emp_Lname,status,emp_Mname,deptFROM td_cookbook.EMP_SALPRIMARY INDEX(emp_Fname); Let’s collect statistics on the join index: /*Collect stats on JI*/collect stats td_cookbook.EMP_JI column emp_Fname Now, we will check the explain plan query on the WHERE clause using the column emp_Fname: Explain sel id,dept,emp_Fname,emp_Lname,status fromtd_cookbook.EMP_SALwhere emp_Fname=’ankita’;1) First, we do a single-AMP RETRIEVE step from td_cookbooK.EMP_JI by way of the primary index “td_cookbooK.EMP_JI.emp_Fname = ‘ankita'” with no residual conditions into Spool 1 (one-amp), which is built locally on that AMP. The size of Spool 1 is estimated with low confidence to be 2 rows (118 bytes). The estimated time for this step is 0.02 seconds. -> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 0.02 seconds. In EXPLAIN, you can see that the optimizer is using the join index instead of the base table when the table queries are using the Emp_Fname column. How it works… Query performance improves any time a join index can be used instead of the base tables. A join index is most useful when its columns can satisfy, or cover, most or all of the requirements in a query. For example, the optimizer may consider using a covering index instead of performing a merge join. When we are able to cover all the queried columns that can be satisfied by a join index, then it is called a cover query. Covering indexes improve the speed of join queries. The extent of improvement can be dramatic, especially for queries involving complex, large-table, and multiple-table joins. The extent of such improvement depends on how often an index is appropriate to a query. There are a few more join indexes that can be used in Teradata: Aggregate-table join index: A type of join index which pre-joins and summarizes aggregated tables without requiring any physical summary tables. It refreshes automatically whenever the base table changes. Only COUNT and SUM are permitted, and DISTINCT is not permitted: /*AG JOIN INDEX*/CREATE JOIN INDEX Agg_Join_Index ASSELECT Cust_ID,Order_ID,SUM(Sales_north) — Aggregate columnFROMsales_tableGROUP BY 1,2Primary Index(Cust_ID)Use FLOAT as a data type for COUNT and SUM to avoid overflow. Sparse join index: When a WHERE clause is applied in a JOIN INDEX, it is know as a sparse join index. By limiting the number of rows retrieved in a join, it reduces the size of the join index. It is also useful for UPDATE statements where the index is highly selective: /*SP JOIN INDEX*/CREATE JOIN INDEX Sparse_Join_Index ASSELECT Cust_ID,Order_ID,SUM(Sales_north) — Aggregate columnFROMsales_tablewhere Order_id = 1 — WHERE CLAUSEGROUP BY 1,2Primary Index(Cust_ID) Creating a hash index to improve performance Hash indexes are designed to improve query performance like join indexes, especially single table join indexes, and in addition, they enable you to avoid accessing the base table. The syntax for the hash index is as follows: /*Hash index syntax*/CREATE HASH INDEX [, ]() ON [BY ()][ORDER BY ] ; Getting ready You need to connect to the Teradata database. Let’s create a table and insert data into it using the following DDL: /*Create table with data*/CREATE TABLE td_cookbook.EMP_SAL(id INT,DEPT varchar(25),emp_Fname varchar(25),emp_Lname varchar(25),emp_Mname varchar(25),status INT)primary index(id);INSERT into td_cookbook.EMP_SAL VALUES (1,’HR’,’Anikta’,’lal’,’kumar’,1);INSERT into td_cookbook.EMP_SAL VALUES (2,’HR’,’Anik’,’kumar’,’kumar’,2);INSERT into td_cookbook.EMP_SAL VALUES (3,’IT’,’Arjun’,’sharma’,’lal’,1);INSERT into td_cookbook.EMP_SAL VALUES (4,’SALES’,’Billa’,’Suti’,’raj’,2);INSERT into td_cookbook.EMP_SAL VALUES (4,’IT’,’Koyd’,’Loud’,’harlod’,1);INSERT into td_cookbook.EMP_SAL VALUES (2,’HR’,’Harlod’,’lal’,’kumar’,1); How to do it… You need to connect to the Teradata database using SQLA or Studio. Let’s check the explain plan of the following query shown in the figure: /*EXPLAIN of SELECT*/Explain sel id,emp_Fname from td_cookbook.EMP_SAL; 1) First, we lock td_cookbook.EMP_SAL for read on a reserved RowHash to prevent global deadlock. 2) Next, we lock td_cookbook.EMP_SAL for read. 3) We do an all-AMPs RETRIEVE step from td_cookbook.EMP_SAL by way of an all-rows scan with no residual conditions into Spool 1 (group_amps), which is built locally on the AMPs. The size of Spool 1 is estimated with high confidence to be 6 rows (210 bytes). The estimated time for this step is 0.04 seconds. 4) Finally, we send out an END TRANSACTION step to all AMPs involved in processing the request. -> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 0.04 seconds. Now let’s create a hash join index on the EMP_SAL table: /*Hash Indx*/CREATE HASH INDEX td_cookbook.EMP_HASH_inx(id, DEPT) ON td_cookbook.EMP_SALBY (id)ORDER BY HASH (id); Let’s now check the explain plan on the select query after the hash index creation: /*Select after hash idx*/EXPLAIN SELCT id,dept from td_cookbook.EMP_SAL 1) First, we lock td_cookbooK.EMP_HASH_INX for read on a reserved RowHash to prevent global deadlock. 2) Next, we lock td_cookbooK.EMP_HASH_INX for read. 3) We do an all-AMPs RETRIEVE step from td_cookbooK.EMP_HASH_INX by way of an all-rows scan with no residual conditions into Spool 1 (group_amps), which is built locally on the AMPs. The size of Spool 1 is estimated with high confidence to be 6 rows (210 bytes). The estimated time for this step is 0.04 seconds. 4) Finally, we send out an END TRANSACTION step to all AMPs involved in processing the request. -> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 0.04 seconds. Explain plan can be see in the snippet from SQLA: How it works… Points to consider about the hash index definition are: Each hash index row contains the department id and the department name. Specifying the department id is unnecessary, since it is the primary index of the base table and will therefore be automatically included. The BY clause indicates that the rows of this index will be distributed by the department id hash value. The ORDER BY clause indicates that the index rows will be ordered on each AMP in sequence by the department id hash value. The column specified in the BY clause should be part of the columns which make up the hash index. The BY clause comes with the ORDER BY clause. Unlike join indexes, hash indexes can only be on a single table. We explored how to create different types of index to bring up maximum performance in your database queries. If this article made your way, do check out the book Teradata Cookbook and gain confidence in running a wide variety of Data analytics to develop applications for the Teradata environment. Read Next: Why MongoDB is the most popular NoSQL database today Why Oracle is losing the Database Race Using the Firebase Real-Time Database