<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [postgis-devel] CLUSTER in 8.3</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Tried from psql to rule that out as an issue and works fine for me still.<BR>
<BR>
So I guess its more than 8.3.5 at play here.<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: postgis-devel-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR>
Sent: Fri 12/5/2008 12:17 PM<BR>
To: PostGIS Development Discussion<BR>
Subject: Re: [postgis-devel] CLUSTER in 8.3<BR>
<BR>
Well, psql is autocommitting, and if I do the cluster, then disconnect<BR>
and reconnect, the count is still zero.  I think I just need to get<BR>
the older point releases and walk back and see if it goes away.<BR>
<BR>
P.<BR>
<BR>
On Thu, Dec 4, 2008 at 10:43 PM, Obe, Regina <robe.dnd@cityofboston.gov> wrote:<BR>
> On further inspection.  If I do this:<BR>
><BR>
> drop table ttt;<BR>
> create table ttt as select * from all_counties;<BR>
> create index ttt_gix on ttt using gist(the_geom);<BR>
> cluster ttt using ttt_gix;<BR>
><BR>
><BR>
> --Then do this after the above is done<BR>
> select count(*) from ttt;<BR>
><BR>
> count is 3141<BR>
><BR>
> So I think the fact you are doing a count in the same transaction may be<BR>
> clobbering it.<BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: postgis-devel-bounces@postgis.refractions.net on behalf of Obe, Regina<BR>
> Sent: Fri 12/5/2008 1:36 AM<BR>
> To: PostGIS Development Discussion<BR>
> Subject: RE: [postgis-devel] CLUSTER in 8.3<BR>
><BR>
> Paul,<BR>
><BR>
> Hold on a minute. I was counting the wrong table.  Yap I get the same<BR>
> behavior, so I guess you are not crazy.<BR>
><BR>
> drop table ttt;<BR>
> create table ttt as select * from all_counties;<BR>
> create index ttt_gix on ttt using gist(the_geom);<BR>
> cluster ttt using ttt_gix;<BR>
> select count(*) from ttt;<BR>
><BR>
> --count is 0<BR>
><BR>
><BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: postgis-devel-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR>
> Sent: Fri 12/5/2008 12:42 AM<BR>
> To: PostGIS Development Discussion<BR>
> Subject: Re: [postgis-devel] CLUSTER in 8.3<BR>
><BR>
> And everything works hunky dory with postgis 1.4.0 and pgsql 8.2.11...<BR>
><BR>
> On Thu, Dec 4, 2008 at 9:36 PM, Paul Ramsey <pramsey@cleverelephant.ca><BR>
> wrote:<BR>
>> I just confirmed this happening under PostGIS 1.3.4 also...<BR>
>><BR>
>> P<BR>
>><BR>
>> On Thu, Dec 4, 2008 at 9:35 PM, Paul Ramsey <pramsey@cleverelephant.ca><BR>
>> wrote:<BR>
>>> You clustered ttt then you counted all_counties...<BR>
>>><BR>
>>> P<BR>
>>><BR>
>>> On Thu, Dec 4, 2008 at 8:44 PM, Obe, Regina <robe.dnd@cityofboston.gov><BR>
>>> wrote:<BR>
>>>> I tried your test on my all_counties table and it worked fine.  But I<BR>
>>>> was<BR>
>>>> doing it from pgadmin III.  and I have left out that  clusture thing you<BR>
>>>> were doing.  What does that do? :)<BR>
>>>><BR>
>>>> create table ttt as select * from all_counties;<BR>
>>>> create index ttt_gix on ttt using gist(the_geom);<BR>
>>>> cluster ttt using ttt_gix;<BR>
>>>> select count(*) from all_counties;<BR>
>>>><BR>
>>>> -- gives me 3141 records --<BR>
>>>><BR>
>>>> I guess we must have similar county tables since we have the same record<BR>
>>>> count.<BR>
>>>><BR>
>>>> My projection is in 3395.<BR>
>>>><BR>
>>>> running<BR>
>>>> "PostgreSQL 8.3.5 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)<BR>
>>>> 4.1.2<BR>
>>>> 20071124 (Red Hat 4.1.2-42)"<BR>
>>>> "POSTGIS="1.3.4" GEOS="3.0.3-CAPI-1.4.2" PROJ="Rel. 4.5.0, 22 Oct 2006"<BR>
>>>> USE_STATS"<BR>
>>>><BR>
>>>> Hope that helps,<BR>
>>>> Regina<BR>
>>>><BR>
>>>> -----Original Message-----<BR>
>>>> From: postgis-devel-bounces@postgis.refractions.net on behalf of Paul<BR>
>>>> Ramsey<BR>
>>>> Sent: Thu 12/4/2008 3:37 PM<BR>
>>>> To: PostGIS Development Discussion<BR>
>>>> Subject: Re: [postgis-devel] CLUSTER in 8.3<BR>
>>>><BR>
>>>> Maybe I'm doing something wrong... here's a log of how I exercised this:<BR>
>>>><BR>
>>>> pramsey=# create table ttt as select * from counties;<BR>
>>>> SELECT<BR>
>>>> pramsey=# create index ttt_gix on ttt using gist(the_geom);<BR>
>>>> CREATE INDEX<BR>
>>>> pramsey=# clusture<BR>
>>>> pramsey=# select count(*) from ttt;<BR>
>>>>  count<BR>
>>>> -------<BR>
>>>>   3141<BR>
>>>> (1 row)<BR>
>>>><BR>
>>>> pramsey=# cluster ttt using ttt_gix;<BR>
>>>> CLUSTER<BR>
>>>> pramsey=# select count(*) from ttt;<BR>
>>>>  count<BR>
>>>> -------<BR>
>>>>      0<BR>
>>>> (1 row)<BR>
>>>><BR>
>>>> pramsey=# select version();<BR>
>>>>                                                            version<BR>
>>>><BR>
>>>> ------------------------------------------------------------------------------------------------------------------------------<BR>
>>>>  PostgreSQL 8.3.5 on i386-apple-darwin9.5.0, compiled by GCC<BR>
>>>> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)<BR>
<BR>
>>>> (1 row)<BR>
>>>><BR>
>>>> pramsey=# select postgis_full_version();<BR>
>>>>                                 postgis_full_version<BR>
>>>><BR>
>>>> -------------------------------------------------------------------------------------<BR>
>>>>  POSTGIS="1.3.4SVN" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.0, 21 Dec<BR>
>>>> 2007" USE_STATS<BR>
>>>> (1 row)<BR>
>>>><BR>
>>>> pramsey=#<BR>
>>>><BR>
>>>><BR>
>>>> On Wed, Dec 3, 2008 at 8:43 AM, Kevin Neufeld <kneufeld@refractions.net><BR>
>>>> wrote:<BR>
>>>>> Is seems fine (for Points anyway) on my 8.3.3 install running on an old<BR>
>>>>> FC3<BR>
>>>>> box.<BR>
>>>>><BR>
>>>>> Did you run out of disk space?  Did the transaction get half way<BR>
>>>>> through<BR>
>>>>> and<BR>
>>>>> was forced to stop?<BR>
>>>>><BR>
>>>>> -- Kevin<BR>
>>>>><BR>
>>>>> Paul Ramsey wrote:<BR>
>>>>>><BR>
>>>>>> Is it just me, or has clustering on spatial indexes stopped working in<BR>
>>>>>> 8.3? First, the syntax of CLUSTER has been changed, from "CLUSTER<BR>
>>>>>> [index] ON [table]" to "CLUSTER [table] USING [index]". Second, when I<BR>
>>>>>> run the new syntax using a gist index as the target, the index<BR>
>>>>>> disappears and all row count drops to zero!<BR>
>>>>>><BR>
>>>>>> P.<BR>
>>>>>> _______________________________________________<BR>
>>>>>> postgis-devel mailing list<BR>
>>>>>> postgis-devel@postgis.refractions.net<BR>
>>>>>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>>>>><BR>
>>>>> _______________________________________________<BR>
>>>>> postgis-devel mailing list<BR>
>>>>> postgis-devel@postgis.refractions.net<BR>
>>>>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>>>>><BR>
>>>> _______________________________________________<BR>
>>>> postgis-devel mailing list<BR>
>>>> postgis-devel@postgis.refractions.net<BR>
>>>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>> ________________________________<BR>
>>>><BR>
>>>> The substance of this message, including any attachments, may be<BR>
>>>> confidential, legally privileged and/or exempt from disclosure pursuant<BR>
>>>> to<BR>
>>>> Massachusetts law. It is intended solely for the addressee. If you<BR>
>>>> received<BR>
>>>> this in error, please contact the sender and delete the material from<BR>
>>>> any<BR>
>>>> computer.<BR>
>>>><BR>
>>>> ________________________________<BR>
>>>><BR>
>>>> Help make the earth a greener place. If at all possible resist printing<BR>
>>>> this<BR>
>>>> email and join us in saving paper.<BR>
>>>><BR>
>>>> _______________________________________________<BR>
>>>> postgis-devel mailing list<BR>
>>>> postgis-devel@postgis.refractions.net<BR>
>>>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>>>><BR>
>>>><BR>
>>><BR>
>><BR>
> _______________________________________________<BR>
> postgis-devel mailing list<BR>
> postgis-devel@postgis.refractions.net<BR>
> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
><BR>
><BR>
><BR>
><BR>
> ________________________________<BR>
><BR>
> The substance of this message, including any attachments, may be<BR>
> confidential, legally privileged and/or exempt from disclosure pursuant to<BR>
> Massachusetts law. It is intended solely for the addressee. If you received<BR>
> this in error, please contact the sender and delete the material from any<BR>
> computer.<BR>
><BR>
> ________________________________<BR>
><BR>
> Help make the earth a greener place. If at all possible resist printing this<BR>
> email and join us in saving paper.<BR>
><BR>
> _______________________________________________<BR>
> postgis-devel mailing list<BR>
> postgis-devel@postgis.refractions.net<BR>
> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
><BR>
><BR>
_______________________________________________<BR>
postgis-devel mailing list<BR>
postgis-devel@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>