[Pgsql-ayuda] Re: [Pgsql-ayuda] ¿Cómo se come esto?

From: Antonio Mármol Albert <toni(at)infurma(dot)combios(dot)es>
To: Pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: [Pgsql-ayuda] Re: [Pgsql-ayuda] ¿Cómo se come esto?
Date: 2002-11-27 17:46:43
Message-ID: 20021127184643.C2011@infurma.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

El miércoles 27 de noviembre de 2002 (11:49), Manuel Sugawara escribió:

> Antonio Mármol Albert <toni(at)infurma(dot)combios(dot)es> writes:
>
> > (Consulta 1)
> >
> > habitat=# SELECT id, marca FROM empresas WHERE marca = 'Muebles Celda';
> > id | marca
> > -------+---------------
> > 21293 | Muebles Celda
> >
> >
> > (Consulta 2)
> >
> > habitat=# SELECT id, marca FROM empresas WHERE id=21293;
> > id | marca
> > ----+-------
> > (0 rows)
>
> umh, esta raro. Tal vez tienes un índice corrupto; ¿dices que id es
> llave primaria?, tal vez algo como:
>
> reindex empresas_pkey;

habitat=# reindex empresas_pkey;
ERROR: parser: parse error at or near "empresas_pkey"

>
> ayude. ¿qué te dice el explain de abajo?
>
> explain analyze SELECT id, marca FROM empresas WHERE id=21293;

habitat=# explain analyze SELECT id, marca FROM empresas WHERE id=21293;
NOTICE: QUERY PLAN:

Index Scan using empresas_pkey on empresas (cost=0.00..6.01 rows=1
width=86) (actual time=10.77..10.77 rows=0 loops=1)
Total runtime: 10.88 msec

EXPLAIN

habitat=# SELECT id, marca FROM empresas WHERE id=21293;
id | marca
----+-------
(0 rows)

Primero dice "1 rows" y luego "0 rows". Curioso...

--
Antonio Mármol Albert ( toni(at)infurma(dot)es )
http://www.infurma.es

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Manuel Sugawara 2002-11-27 17:49:21 Re: [Pgsql-ayuda] ¿Cómo se come esto?
Previous Message Antonio Mármol Albert 2002-11-27 17:42:56 [Pgsql-ayuda] Re: [Pgsql-ayuda] ¿Cómo se come esto?