SQL_CALC_FOUND_ROWS in POSTGRESQL / Some one can helpe me.
| От | Marcos Borges |
|---|---|
| Тема | SQL_CALC_FOUND_ROWS in POSTGRESQL / Some one can helpe me. |
| Дата | |
| Msg-id | 457814D3.1030001@mbsi.com.br обсуждение |
| Ответы |
Re: SQL_CALC_FOUND_ROWS in POSTGRESQL / Some one can helpe
|
| Список | pgsql-performance |
07/12/2006 04:31
SQL_CALC_FOUND_ROWS in POSTGRESQLIn mysqln i m using the command SQL_CALC_FOUND_ROWS in follow sintax.
SELECT SQL_CALC_FOUND_ROWS name, email, tel FROM mytable WHERE name <> '' LIMIT 0, 10
to have the recorset data.
and
SELECT FOUND_ROWS();
to have the total of registers found.
I dont want to use the command count(*), because the performance will fall down, depending of the quantyt of tables and "joins".
The Data base postgresql have something similar ???
---------------------------------------------------------------------------------------------------
07/12/2006 04:31
SQL_CALC_FOUND_ROWS no POSTGRESQLDúvida NINJA no POSTGRESQL
No mysql utilizo o comando SQL_CALC_FOUND_ROWS na seguinte sintax
SELECT SQL_CALC_FOUND_ROWS nome, email, telefone FROM tabela WHERE nome <> '' LIMIT 0, 10
para obter o meu recordset
e
SELECT FOUND_ROWS();
para obter o total de resgitros que realmente existem em minha tabela condicionado pelo WHERE, sem ser limitado pelo LIMIT.
Não quero usar o count(*) pois o desempenho cai dependendo da quantidade de tabelas selecionadas e quantidade de registros.
O postgreSQL possui algo similar? Caso sim pode me informar qual e fornecer um exemplo.
В списке pgsql-performance по дате отправления: