The variation in class sizes from 18 to 33 may be harming pupils' learning, the president of the Headteachers' Association of Scotland has warned.
Brian Cooklin has called for research into the impact on pupils of Scotland's class sizes "roller-coaster", as the Educational Institute of Scotland describes it.
Class sizes in secondary can change from one period to the next and some pupils may struggle to "adjust", he argued.
"It is not necessarily the best way for them to learn," he said.
"We now have a situation where from P1-3 class sizes are 18, then they rise to 30 or maybe 33, then back to 20 (for English and maths in S1 and 2) and into the 30s again for different stages of their learning. There is no research of substance to show the impact that this has. I think that is something we should be wary of."
Mr Cooklin, who was giving evidence to the Parliament's education committee on the EIS's class-sizes petition, also claimed it was "indefensible" to reduce class sizes in subjects such as English and maths while ignoring languages, social subjects and religious and moral education.
"If we want to encourage language and the development of languages, it makes no sense to say it's all right to have 30 or 33 in a class."
Adequate resourcing for class-size reductions remained the "perennial concern" of HAS, he said.
The Association of Directors of Education in Scotland echoed this, telling the committee it estimated it would cost more than pound;400 million to deliver classes of 18 in P1-3, pound;62 million annually for additional teachers and pound;360 million for additional classrooms.
"pound;360 million is a lot of money, particularly given the needs of the school estate in Scotland generally," Murdo MacIver, convener of the association's resources committee, told MSPs. "That's equivalent to 10 secondaries or thereabouts."
Councils currently did not have the money to deliver class sizes of 18, he declared.
"The assumption had been that demographic changes - falling school rolls - would facilitate class-size reduction," said Mr Cooklin. "However, this is a blunt instrument and a generalisation which is damaging for those schools where the roll has remained static or even increased."
There was evidence that the decline in school rolls would not continue and might even go into reverse, added Mr MacIver.
However, classes could also be too small, MSPs were warned.
Greg Dempster, general secretary of the Association of Headteachers and Deputes in Scotland, said: "As well as having too large a class for effective relationships, you can have too small a class as well."