4- Question

2010-05-02 Thread Junior Ortis
Hi guys, i have a server with 20GB InnoDb on a single database and i use just one user for its. I use mysql 5.4 1- If i change my SCSI 15k RPM to a SSD i will increase my performance ? 2- What is the fast method to a backup to this InnoDB database ? And the more easy ? And how i restore its ? 3

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread Rob Wultsch
>>> >> >>> On Sat, May 1, 2010 at 11:12 PM, dan wrote: >>> >> >>> >>> >> >>> >> Can any one help me with understanding the mysql spatial >>> >> functions? >>> >>  I >>> >> can >>> >> only seem to find bits and pieces of how-to's etc. >>> >> >>> >> I have an exist

Re: How to Get Running Totals.

2010-05-02 Thread Peter Brawley
>I am trying to get running totals See "Running sum" at http://www.artfulsoftware.com/infotree/queries.php. PB - Venugopal Rao wrote: I am trying to get running totals for the following: Project Code---R&D---STP--RunningTotal 1007303--04---04---8 1007304--04---04--

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
Ok... I am close I forgot an extra () in my POLYGON statement: UPDATE `grid` SET lsd_poly = GeomFromText(CONCAT('POLYGON((',n,' ',e,', ',s,' ',e,', ',s,' ',w,', ',n,' ',w,', ',n,' ',e,'))')); (I also created a new GEOMETRY lsd_poly column rather than the poly POLYGON one). Now I nee

How to Get Running Totals.

2010-05-02 Thread Venugopal Rao
I am trying to get running totals for the following: Project Code---R&D---STP--RunningTotal 1007303--04---04---8 1007304--04---04---16   I tried to follow the examples available on the site but it is giving errors. I am using java as a middleware and mysql as back end. I am

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
poly is a polygon but I have not added a spatial index yet. Here's where it gets weird. I tried adding dummy data: mysql> SET @bbox = 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))'; Query OK, 0 rows affected (0.01 sec) mysql> update grid set poly = GeomFromText(@bbox); Query OK, 7876282 rows

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
Tried it but no luck: mysql> UPDATE `grid` SET poly = GeomFromText(CONCAT('POLYGON(',n,' ',e,', ',s,' ',e,', ',s,' ',w,', ',n,' ',w,', ',n,' ',e,')')); Query OK, 0 rows affected (2 min 3.86 sec) Rows matched: 7876282 Changed: 0 Warnings: 0 mysql> select poly from grid limit 10; +--

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
I am still lost... I tried this: UPDATE `grid` SET poly = PolygonFromText(CONCAT('POLYGON(',n,' ',e,', ',s,' ',e,', ',s,' ',w,', ',n,' ',w,', ',n,' ',e,')')); I had my delimiters mixed up and I know my CONCAT worked: mysql> select CONCAT('POLYGON(',n,' ',e,', ',s,' ',e,', ',s,' ',w,', ',

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread Baron Schwartz
Dan, I think you are trying to create a polygon based on the values in other columns in the same row. I think these other columns are named `n` and so on. Your mistake is that you are creating a text string, "POLYGON(..)" and embedding column names inside it. That won't work. Those column

Re: mysql spatial functions (Was: Best index for searching on lat / long data i.e. decimal vs. float)

2010-05-02 Thread dan
I have seen that but I am stuck at just populating my POLYGON column (poly). I have tried this: UPDATE `grid` SET poly = PolygonFromText('POLYGON(`n` `e`, `s` `e`, `s` `w`, `n` `w`, `n` `e`)'); but my poly column just reports back NULL. the n, e, s & w columns are decimal lat / long da