Re: selecting data for computation

2010-06-25 Thread Tim Gustafson
> That shouldn't happen, since get_lock() will only succeed for one mysql > connection at a time. I figured it out. Because there was an order by clause, the get_lock function was being called for each row in the result set, and since each call to get_lock releases any previous locks you had, myS

Re: selecting data for computation

2010-06-25 Thread Joerg Bruehe
Hi Tim, all! Tim Gustafson wrote: > [[...]] > > There is not an index on the work_data column as it's a longblob and I was > under the impression that indexing a longblob field wasn't helpful. Maybe > I should add a work_data_size field as an integer, index that, and search > for records where

Re: selecting data for computation

2010-06-25 Thread Dan Nelson
In the last episode (Jun 24), Tim Gustafson said: > Hrmm, something didn't work quite right. Here's the actual query: > > select x, y, zoom from map_images where image_data_size = 0 and > get_lock(concat(x, ',', y, ',', zoom), 0) = 1 order by zoom > , sqrt(pow(x, 2) + pow(y, 2)) limit 1 > > I've

Re: Altering database size to add more space

2010-06-25 Thread Carsten Pedersen
On Fri, 25 Jun 2010 06:31:11 -0500, Jim Lyons wrote: > I think you're confusing table size with data base size. The original post > grouped by schema so it appears the question concerns database size. I > don't believe mysql imposes any limits on that. Is there a limit on the > number of

Re: Altering database size to add more space

2010-06-25 Thread Jim Lyons
I think you're confusing table size with data base size. The original post grouped by schema so it appears the question concerns database size. I don't believe mysql imposes any limits on that. Is there a limit on the number of tables you can have in a schema imposed by mysql? On Fri, Jun 25,

Re: Table creation fail

2010-06-25 Thread Prabhat Kumar
Yes, but few exceptions; Column level constraints are applicable to that column only, whereas table level constraints are used to define composite keys like primary key for the combination of two or more columns in a table. column level constraints contain all types of constraints (like, not null

Re: Table creation fail

2010-06-25 Thread Johan De Meersman
> > A Primary key constraint can be defined at various levels: > >* Primary key constraint defined at column level > Syntax: () Primary Key >* Primary key constraint defined at table level > Syntax: Primary key (, ) > Aren't those two alternate sy

Re: Altering database size to add more space

2010-06-25 Thread Johan De Meersman
On Fri, Jun 25, 2010 at 7:11 AM, Prabhat Kumar wrote: > In case MyISAM it will grow up to space on your data drive or the Max size > of file limited by OS.. > Not entirely correct. There is some kind of limit to a MyISAM file that has to do with pointer size - I've encountered it several years a