Browse files

explain the graph

  • Loading branch information...
1 parent 2170dc5 commit 64f5fd4c42a8fee828cd6e5f43b3378ee7ae2f06 @grosser committed Oct 19, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0
@@ -44,11 +44,17 @@ Delete the shop when a user is no longer a seller
- [Upgrading] in version 0.2.2 the first field(when not given as hash) used bit 2 -> add a bogus field in first position
+ - [Defaults] afaik it is not possible to have some bits true by default (without monkeypatching AR/see [tests]( -> choose a good naming like `xxx_on` / `xxx_off` to use the default 'false'
- Never do: "#{bitfield_sql(...)} AND #{bitfield_sql(...)}", merge both into one hash
- bit_operator is faster in most cases, use :query_mode => :in_list sparingly
- Standard mysql integer is 4 byte -> 32 bitfields
- If you are lazy or bad at math you can also do `bitfields :bits, :foo, :bar, :baz`
+Query-mode Benchmark
+The `:query_mode => :in_list` is slower for most queries and scales mierably with the number of bits.<br/>
+*Stay with the default query-mode*. Only use :in_list if your edge-case shows better performance.

0 comments on commit 64f5fd4

Please sign in to comment.