Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Oleg Bartunov
Folks, we in astronomy permanently work with billiards objects with spherical atributes and have several sky-indexing schemes. See my page for links http://www.sai.msu.su/~megera/wiki/SkyPixelization We have q3c package for PostgreSQL available from q3c.sf.net, which we use in production with t

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread joe
Is there a reason you are not using postgis. The R tree indexes are designed for exactly this type of query and should be able to do it very quickly. Hope that helps, Joe > I have this table: > > CREATE TABLE test_zip_assoc ( > id serial NOT NULL, > f_id integer DEFAULT 0 NOT NULL, >

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Alexander Staubo
On 4/27/07, Alexander Staubo <[EMAIL PROTECTED]> wrote: [snip] PostGIS implements the whole GIS stack, and it's so good at this that it's practically the de facto tool among GIS analysts. Installing PostGIS into a database is simple, and once you have done this, you can augment your table with a

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Alexander Staubo
On 24 Apr 2007 14:26:46 -0700, zardozrocks <[EMAIL PROTECTED]> wrote: I have this table: CREATE TABLE test_zip_assoc ( id serial NOT NULL, f_id integer DEFAULT 0 NOT NULL, lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, long_radians numeric(6,5) DEFAULT 0.0 NOT NULL ); CRE

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Jeff Hoffmann
zardozrocks wrote: I have this table: CREATE TABLE test_zip_assoc ( id serial NOT NULL, f_id integer DEFAULT 0 NOT NULL, lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, long_radians numeric(6,5) DEFAULT 0.0 NOT NULL ); CREATE INDEX lat_radians ON test_zip_assoc USING btree

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Scott Marlowe
On Tue, 2007-04-24 at 16:26, zardozrocks wrote: > I have this table: > > CREATE TABLE test_zip_assoc ( > id serial NOT NULL, > f_id integer DEFAULT 0 NOT NULL, > lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, > long_radians numeric(6,5) DEFAULT 0.0 NOT NULL > ); Like someo

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Luke Lonergan
uz m on ma treo -Original Message- From: Bill Moran [mailto:[EMAIL PROTECTED] Sent: Thursday, April 26, 2007 05:13 PM Eastern Standard Time To: zardozrocks Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Simple query, 10 million records...MySQL ten times

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Benjamin Minshall
zardozrocks wrote: lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, long_radians numeric(6,5) DEFAULT 0.0 NOT NULL Native data types such as integer or real are much faster than numeric. If you need 6 digits, it's better to multiply your coordinates by 10^6 and store as INTEGER

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Bill Moran
In response to zardozrocks <[EMAIL PROTECTED]>: > I have this table: > > CREATE TABLE test_zip_assoc ( > id serial NOT NULL, > f_id integer DEFAULT 0 NOT NULL, > lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, > long_radians numeric(6,5) DEFAULT 0.0 NOT NULL > ); > CREATE I

Re: [PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread Merlin Moncure
On 24 Apr 2007 14:26:46 -0700, zardozrocks <[EMAIL PROTECTED]> wrote: I have this table: CREATE TABLE test_zip_assoc ( id serial NOT NULL, f_id integer DEFAULT 0 NOT NULL, lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, long_radians numeric(6,5) DEFAULT 0.0 NOT NULL ); CRE

[PERFORM] Simple query, 10 million records...MySQL ten times faster

2007-04-26 Thread zardozrocks
I have this table: CREATE TABLE test_zip_assoc ( id serial NOT NULL, f_id integer DEFAULT 0 NOT NULL, lat_radians numeric(6,5) DEFAULT 0.0 NOT NULL, long_radians numeric(6,5) DEFAULT 0.0 NOT NULL ); CREATE INDEX lat_radians ON test_zip_assoc USING btree (lat_radians); CREAT