Thiruvaiyaru is located on the banks of kaviri and very famous for the shiva temple and thiyagarayar urchavam. Thiruvaiyaru is located around 15km from thanjavur enroute perambalur. In PS kakli has described about this town elaborately while VD travels to thanjavur first time and in the last part when kundhavai and vanthi meet the kudanthai jothidar at thiruvaiyaru. Even he would explain the "appar kayilaya kaatchi" at thiruvaiyaru in his own style through sembian madevi.
The thalapuranam says this temple was first built by Karikalan after his victory upto kailash. I have made a post about the temple aramvalartha naayagi udanurai ayyaarappan temple and its history.