librelist archives

« back to archive

id is not unique in TableCreator#create_document_table

id is not unique in TableCreator#create_document_table

From:
Arun Thampi
Date:
2010-02-04 @ 09:21
Hi guys - I noticed that id is not set to be unique in
TableCreator#create_document_table even though the documentation says id is
unique. Shouldn't that be set to be unique? I noticed this while we were
testing in staging and saw a bunch of queries in our slow query log which
were doing full-table scans for queries such as Property.find('xxx')

Cheers,
Arun

-- 
It's better to be a pirate than join the Navy - Steve Jobs
http://mclov.in

Re: [friendly] id is not unique in TableCreator#create_document_table

From:
James Golick
Date:
2010-02-04 @ 16:23
Yes, it should be unique. If you send me a patch, I'll merge it and deploy.

- james

On Thu, Feb 4, 2010 at 1:21 AM, Arun Thampi <arun.thampi@gmail.com> wrote:

> Hi guys - I noticed that id is not set to be unique in
> TableCreator#create_document_table even though the documentation says id is
> unique. Shouldn't that be set to be unique? I noticed this while we were
> testing in staging and saw a bunch of queries in our slow query log which
> were doing full-table scans for queries such as Property.find('xxx')
>
> Cheers,
> Arun
>
> --
> It's better to be a pirate than join the Navy - Steve Jobs
> http://mclov.in
>

Re: [friendly] id is not unique in TableCreator#create_document_table

From:
Arun Thampi
Date:
2010-02-04 @ 23:03
Hi James - Thanks! I just sent you a pull request on GitHub. I noticed
there's no way to verify this in the spec, since the Sequel schema object
only tells you whether a key is a primary key, and not if its unique.

Cheers,
Arun

On Fri, Feb 5, 2010 at 12:23 AM, James Golick <jamesgolick@gmail.com> wrote:

> Yes, it should be unique. If you send me a patch, I'll merge it and deploy.
>
> - james
>
>
> On Thu, Feb 4, 2010 at 1:21 AM, Arun Thampi <arun.thampi@gmail.com> wrote:
>
>> Hi guys - I noticed that id is not set to be unique in
>> TableCreator#create_document_table even though the documentation says id is
>> unique. Shouldn't that be set to be unique? I noticed this while we were
>> testing in staging and saw a bunch of queries in our slow query log which
>> were doing full-table scans for queries such as Property.find('xxx')
>>
>> Cheers,
>> Arun
>>
>> --
>> It's better to be a pirate than join the Navy - Steve Jobs
>> http://mclov.in
>>
>
>


-- 
It's better to be a pirate than join the Navy - Steve Jobs
http://mclov.in

Re: [friendly] id is not unique in TableCreator#create_document_table

From:
Arun Thampi
Date:
2010-02-04 @ 23:21
Hi James - Sorry I figured out where Sequel stores information on unique
keys and have added the corresponding spec:

http://github.com/arunthampi/friendly/commit/e0a5d6b10323d4b04a393e10a3fad4782e9ed266

Thanks
Arun

On Fri, Feb 5, 2010 at 7:03 AM, Arun Thampi <arun.thampi@gmail.com> wrote:

> Hi James - Thanks! I just sent you a pull request on GitHub. I noticed
> there's no way to verify this in the spec, since the Sequel schema object
> only tells you whether a key is a primary key, and not if its unique.
>
> Cheers,
> Arun
>
>
> On Fri, Feb 5, 2010 at 12:23 AM, James Golick <jamesgolick@gmail.com>wrote:
>
>> Yes, it should be unique. If you send me a patch, I'll merge it and
>> deploy.
>>
>> - james
>>
>>
>> On Thu, Feb 4, 2010 at 1:21 AM, Arun Thampi <arun.thampi@gmail.com>wrote:
>>
>>> Hi guys - I noticed that id is not set to be unique in
>>> TableCreator#create_document_table even though the documentation says id is
>>> unique. Shouldn't that be set to be unique? I noticed this while we were
>>> testing in staging and saw a bunch of queries in our slow query log which
>>> were doing full-table scans for queries such as Property.find('xxx')
>>>
>>> Cheers,
>>> Arun
>>>
>>> --
>>> It's better to be a pirate than join the Navy - Steve Jobs
>>> http://mclov.in
>>>
>>
>>
>
>
> --
> It's better to be a pirate than join the Navy - Steve Jobs
> http://mclov.in
>



-- 
It's better to be a pirate than join the Navy - Steve Jobs
http://mclov.in

Re: [friendly] id is not unique in TableCreator#create_document_table

From:
Arun Thampi
Date:
2010-02-25 @ 04:38
Hey James - Have you gotten the chance to merge these two commits?

Thanks again.

Cheers,
Arun

On Fri, Feb 5, 2010 at 7:21 AM, Arun Thampi <arun.thampi@gmail.com> wrote:

> Hi James - Sorry I figured out where Sequel stores information on unique
> keys and have added the corresponding spec:
> 
http://github.com/arunthampi/friendly/commit/e0a5d6b10323d4b04a393e10a3fad4782e9ed266
>
> Thanks
> Arun
>
>
> On Fri, Feb 5, 2010 at 7:03 AM, Arun Thampi <arun.thampi@gmail.com> wrote:
>
>> Hi James - Thanks! I just sent you a pull request on GitHub. I noticed
>> there's no way to verify this in the spec, since the Sequel schema object
>> only tells you whether a key is a primary key, and not if its unique.
>>
>> Cheers,
>> Arun
>>
>>
>> On Fri, Feb 5, 2010 at 12:23 AM, James Golick <jamesgolick@gmail.com>wrote:
>>
>>> Yes, it should be unique. If you send me a patch, I'll merge it and
>>> deploy.
>>>
>>> - james
>>>
>>>
>>> On Thu, Feb 4, 2010 at 1:21 AM, Arun Thampi <arun.thampi@gmail.com>wrote:
>>>
>>>> Hi guys - I noticed that id is not set to be unique in
>>>> TableCreator#create_document_table even though the documentation says id is
>>>> unique. Shouldn't that be set to be unique? I noticed this while we were
>>>> testing in staging and saw a bunch of queries in our slow query log which
>>>> were doing full-table scans for queries such as Property.find('xxx')
>>>>
>>>> Cheers,
>>>> Arun
>>>>
>>>> --
>>>> It's better to be a pirate than join the Navy - Steve Jobs
>>>> http://mclov.in
>>>>
>>>
>>>
>>
>>
>> --
>> It's better to be a pirate than join the Navy - Steve Jobs
>> http://mclov.in
>>
>
>
>
> --
> It's better to be a pirate than join the Navy - Steve Jobs
> http://mclov.in
>



-- 
It's better to be a pirate than join the Navy - Steve Jobs
http://mclov.in