The behaviour is compared of two solvers for the discrete equations arising from the discretization using Chebyshev collocation of a second-order linear partial differential equation on a square. The alternative solvers considered are a direct solver and an iterative solver based on preconditioning with the matrix arising from finite-difference discretization of the governing equation. The total error of the collocation derivatives and the separate contributions from round-off and discretization error are examined. The efficiency of the two solvers is compared. The iterative solver is more efficient than the direct solver on fine grids for equations similar to the Poisson equation, provided that there are Dirichlet boundary conditions on at least three of the sides of the square.