Discrepancy in query output

Lahari Sengupta <[email protected]>
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <CAKEx41qmhUgdHgovkVibPVOiC3oT+xE7B7H=uNPHbWYiCZV_Ew@mail.gmail.com>
My following query sometimes gives 72 rows and sometimes gives 71 rows as
output. How could it misses one?

SELECT distinct on (st.gid) sv.timing, st.gid, st.area
FROM servers sv
INNER JOIN sites st
ON (st_distance(sv.geom, st.geom)<8.5) where
        sv.workmode = 1 AND sv.timing >= timestamp '2018-02-02 00:00:00'
    and sv.timing <= timestamp '2018-02-02 23:59:59'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.