[postgis-users] Benshmark postgis

Paul Ramsey pramsey at opengeo.org
Thu Nov 25 11:01:44 PST 2010


Oh, no, the results will still be biased by the particular polygon
data. You'll have a "how postgis performs doing p-i-p against a world
countries file" result. Which isn't a generic "how postgis performs
doing p-i-p" result by any stretch of the imagination.

P.

On Thu, Nov 25, 2010 at 10:30 AM, George Silva <georger.silva at gmail.com> wrote:
> To eliminate the problemas presented by Paul, create a regular grid of 1x1
> degrees and populate it randomly with points. Then make your test. All
> square polygons will have 4 vertexes and the test is "less biased".
>
> George
>
> On Thu, Nov 25, 2010 at 3:22 PM, Paul Ramsey <pramsey at opengeo.org> wrote:
>>
>> Depends on who you think the results will be valid for. The
>> countries-of-the-world is a somewhat non-standard GIS collection given
>> the wide variation in polygon sizes, the large numbers of vertices in
>> the larger polygons, and the extreme coverage of the overall area that
>> the bounding boxes of the larger polygons command. In many ways your
>> test of "against the whole world" will be largely a test of "against
>> Russia, Canada, Brazil, and the USA"
>>
>> Data matters,
>>
>> P
>>
>>
>> On Thu, Nov 25, 2010 at 9:16 AM, Arnaud Vandecasteele
>> <arnaud.sig at gmail.com> wrote:
>>  Hi all,
>> >
>> > I've to do a quick benchmark  of postgis. The case is to check if a
>> > point is inside (or not) a polygon.
>> > To do so, I've uploaded in my database a big shapefile which contains
>> > all the world's countries.
>> > After that I've made a simple stored function [1]. This one, take two
>> > arguments :
>> > 1 - The number of points to check
>> > 2 - The number of polygon to check
>> >
>> > Then I run the query and i change the number of iterations or the
>> > number of feature.
>> >
>> > Do you think it's a good way to have some pertinents results ?
>> >
>> >
>> > Best regards
>> >
>> > Arnaud
>> >
>> >
>> > [1]
>> > -- Function: random_poi(integer, integer)
>> >
>> > -- DROP FUNCTION random_poi(integer, integer);
>> >
>> > CREATE OR REPLACE FUNCTION random_poi(integer, integer)
>> >  RETURNS void AS
>> > $BODY$
>> > DECLARE
>> >        iteration alias for $1;
>> >        nb_feat alias for $2;
>> >        pt_x numeric;
>> >        pt_y numeric;
>> >        geom_poi geometry;
>> >        i int := 0;
>> > BEGIN
>> >        WHILE i < iteration LOOP
>> >                i := i + 1;
>> >                -- CREATE RANDOM POSITION
>> >                pt_x := random()*100;
>> >                pt_y := random()*100;
>> >                -- CREATE RANDOM GEOM POI
>> >                geom_poi := ST_GeometryFromText(text 'POINT('||pt_x||'
>> > '||pt_y||')');
>> >                PERFORM ST_CONTAINS(geom_poi, the_geom) FROM world_poly
>> > LIMIT nb_feat;
>> >        END LOOP;
>> >        return;
>> > END;
>> > $BODY$
>> >  LANGUAGE 'plpgsql' IMMUTABLE STRICT
>> >  COST 100;
>> > ALTER FUNCTION random_poi(integer, integer) OWNER TO postgres;
>> > _______________________________________________
>> > postgis-users mailing list
>> > postgis-users at postgis.refractions.net
>> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> >
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> --
> George R. C. Silva
>
> Desenvolvimento em GIS
> http://blog.geoprocessamento.net
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>



More information about the postgis-users mailing list