<!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>Paul,<BR>
<BR>
Hold on a minute. I was counting the wrong table. Yap I get the same 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> 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> 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> wrote:<BR>
>>> I tried your test on my all_counties table and it worked fine. But I 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) 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 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>
>>> 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>
>>> (1 row)<BR>
>>><BR>
>>> pramsey=# select postgis_full_version();<BR>
>>> postgis_full_version<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 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 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>
><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>
</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>