The index of rigidity was introduced by Katz as the Euler characteristic of de Rham cohomology of End-connection of a meromorphic connection on curve. As its name suggests, the index valuates the rigidity of the connection on curve. Especially, in P^1 case, this index makes a significant contribution together with middle convolution. Namely Katz showed that regular singular connection on P^1 can be reduced to a rank 1 connection by middle convolution if and only if the index of rigidity is 2. After that, the work of Crawley-Boevey gave an interpretation of the index of rigidity and the Katz' algorithm from the theory of root system. Namely, he gave a realization of moduli spaces of regular singular connections on a trivial bundle as quiver varieties. In this setting the index of rigidity can be naturally computed by the Euler form of quiver, and the Katz algorithm can be understood as a special example of the theory of Weyl group orbits of positive roots of the quiver. I will give an overview of this story with a generalization to the case of irregular singular connections. Moreover, I will introduce an algebraic curve associated to a linear differential equation on Riemann surface as an analogy of the spectral curve of Higgs bundle. And compare some indices of singularities of differential equation and its associated curve, Milnor numbers and Komatsu-Malgrange irregularities. Finally as a corollary of this comparison of local indices, I will give a comparison between cohomology of the curve and de Rham cohomology of the differential equation and show the coincidence of the index of rigidity and the Euler characteristic of the associated curve.