tab completion doesn't work

The tab completion response is very slow, or sometimes there is no tab completion at all.How should I investigate or handle it?