Sobes.tech
Middle+

# Existe uma tabela com 100.000.000 de registos CREATE TABLE posts ( id BIGSERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, text TEXT NOT NULL ); ####################################### Consulta: SELECT * FROM posts WHERE title = 'Python tutorial'; Plano de execução: Seq Scan on posts (custo=0.00..20834.00 linhas=1 largura=64) (tempo real=0.025..10350.421 linhas=1) Filtro: (title = 'Python tutorial') Linhas removidas pelo filtro: 99999999 Tempo de planeamento: 0.120 ms Tempo de execução: 10350.500 ms O que se pode ver neste plano? Como pode ser otimizado?

# Existe uma tabela com 100.000.000 de registos… - sobes.tech