From: | Emanuel Calvo Franco <postgres(dot)arg(at)gmail(dot)com> |
---|---|
To: | Lista Postgres <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | result set offset -limit que con una query no se encuentra |
Date: | 2009-05-08 15:35:14 |
Message-ID: | f205bb120905080835i23af3f8et2b88ec8ba1e83ceb@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Gente, estoy con pgsql8.4 beta1 y me pasa lo siguiente:
select * from datos limit 1 offset 167914;
texto | entero2 | entero4 |
entero8 | float |
fecha | tiempo | ztiempo
| ip
----------------------------------+---------+-----------+---------------------+------------------+--
----------+----------------------------+-------------------------------+-----------------
18e4745193af9e699014edf21bb86e85 | 1103 | -24471577 |
2064845141951966355 | 305.908181944396 | 2
009-05-08 | 2009-05-08 12:02:28.195846 | 2009-05-08 12:02:28.195846-03
| 34.132.9.141/32
(1 row)
parapruebas=# select * from datos limit 1 offset 167914;
parapruebas=# select entero8, float from datos limit 1 offset 167914;
entero8 | float
---------------------+------------------
4201021101379964833 | 529.568756118882
(1 row)
parapruebas=# select entero4, entero8, float from datos limit 1 offset 167914;
entero4 | entero8 | float
-----------+---------------------+------------------
153051873 | -156940279311698037 | 536.905172820669
(1 row)
No hay campos con valores nulos.
Si miran bien los valores son distintos... :O
Lo único que cree fue una tabla heredada en memoria...
CREATE TABLE datos_ram() INHERITS (datos) TABLESPACE ramy;
QUERY PLAN
----------------------------------------------------------------------------------------------------
-----------------------------
Limit (cost=4013.49..4013.52 rows=1 width=20) (actual
time=2969.851..2969.853 rows=1 loops=1)
-> Result (cost=0.00..4028.36 rows=168536 width=20) (actual
time=0.022..2492.754 rows=167915 lo
ops=1)
-> Append (cost=0.00..4028.36 rows=168536 width=20) (actual
time=0.017..1515.252 rows=167
915 loops=1)
-> Seq Scan on datos (cost=0.00..4012.36 rows=167936
width=20) (actual time=0.011..
551.485 rows=167915 loops=1)
-> Seq Scan on datos_ram datos (cost=0.00..16.00
rows=600 width=20) (never executed
)
Total runtime: 2969.936 ms
(6 rows)
Borré la tabla heredada y los resultados son estos:
parapruebas=# select entero4, entero8, float from datos limit 1 offset 167914;
entero4 | entero8 | float
-----------+--------------------+------------------o8, float from
datos limit 1 o
-17054690 | 174907075697610278 | 245.718919624574
(1 row)
parapruebas=# select entero8, float from datos limit 1 offset 167914;
entero8 | float
---------------------+------------------
1939054161121250427 | 403.497909076978
(1 row)
No hay indices de ningun tipo.
--
Emanuel Calvo Franco
Sumate al ARPUG !
( www.arpug.com.ar)
ArPUG / AOSUG Member
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Ferrer | 2009-05-08 15:37:29 | RE: Herramientas de Pruebas |
Previous Message | Alvaro Herrera | 2009-05-08 15:21:12 | Re: Herramientas de Pruebas |