Hey Arun,
There could be multiple reasons for your query to be slow...

indexes not right
locking issue on the table

Can you post more details on the table and query

Also,

I dont think memcached is the right solution for you as memcached is not
supposed to behave like a database.
You might get unexpected outcomes if you use memcached and
- some server crashes while you are processing
- LRU replaces the data that you have loaded in memcached... so it might
just so happen that you are loading table A and when you loaded the n
millionth row, the first row is replaced n so on


Thanks
Himanshu



On Fri, Jun 13, 2008 at 4:06 AM, Arun Singhal <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I have million of reords in a table and I want to update a column in the
> same table by checking value of another column in the same table. For e.g.
> two columns A and B. Now if the value of column A is X then update value of
> column B as true else false. Now to apply this functionality on that table
> in mysql is taking huge time. I want to reduce the time by using memcache.
> Can you guide me how can I do that using memcache?
>
> Thanks,
>
> Arun Singhal
>
>
> -----Original Message-----
> From: Brian Aker [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 13, 2008 1:12 PM
> To: Arun Singhal
> Cc: 'Henrik Schröder'; memcached@lists.danga.com;
> [EMAIL PROTECTED]
> Subject: Re: memcache as database
>
> Can you describe what you want to do? We have found that the UDF's for
> MySQL can achieve anything the engine could.
>
> Cheers,
>        -Brian
>
> On Jun 12, 2008, at 9:59 PM, Arun Singhal wrote:
>
> > Hi,
> >
> > I am trying to install memcache_engine-0.7  on my system. I have
> > already installed libxml and libxmlrow. While installing engine I
> > got the following error. Can anybody help me to resolve this error?
> >
> >
> >
> > Making install in src
> > make[1]: Entering directory `/memcache/memcache_engine-0.7/
> > memcache_engine-0.7/src'
> > /bin/sh ../libtool --preserve-dup-deps --tag=CXX   --mode=compile g+
> > + -DHAVE_CONFIG_H -I. -I.. -DMYSQL_DYNAMIC_PLUGIN  -
> > DUNIV_MUST_NOT_INLINE -DFORCE_INIT_OF_VARS -I/usr/local/mysql/sql -I/
> > usr/local/mysql/include -I/usr/local/mysql/regex -I/usr/local/mysql -
> > I/usr/local/include/libxml2 -I/usr/local/include/libxmlrow      -g -
> > O2 -fno-implicit-templates -fno-exceptions -fno-rtti -MT
> > ha_memcache.lo -MD -MP -MF .deps/ha_memcache.Tpo -c -o
> > ha_memcache.lo ha_memcache.cc
> >  g++ -DHAVE_CONFIG_H -I. -I.. -DMYSQL_DYNAMIC_PLUGIN -
> > DUNIV_MUST_NOT_INLINE -DFORCE_INIT_OF_VARS -I/usr/local/mysql/sql -I/
> > usr/local/mysql/include -I/usr/local/mysql/regex -I/usr/local/mysql -
> > I/usr/local/include/libxml2 -I/usr/local/include/libxmlrow -g -O2 -
> > fno-implicit-templates -fno-exceptions -fno-rtti -MT ha_memcache.lo -
> > MD -MP -MF .deps/ha_memcache.Tpo -c ha_memcache.cc  -fPIC -DPIC -
> > o .libs/ha_memcache.o
> > ha_memcache.cc:30:24: error: mysql_priv.h: No such file or directory
> > ha_memcache.cc:34:26: error: mysql/plugin.h: No such file or directory
> > ha_memcache.h:41: error: 'THR_LOCK' does not name a type
> > ha_memcache.h:53: error: expected class-name before '{' token
> > ha_memcache.h:54: error: 'THR_LOCK_DATA' does not name a type
> > ha_memcache.h:72: error: ISO C++ forbids declaration of 'Field' with
> > no type
> > ha_memcache.h:72: error: expected ';' before '*' token
> > ha_memcache.h:73: error: 'Field' has not been declared
> > ha_memcache.h:76: error: expected `)' before '*' token
> > ha_memcache.h:92: error: 'ulonglong' does not name a type
> > ha_memcache.h:161: error: use of enum 'ha_rkey_function' without
> > previous declaration
> > ha_memcache.h:164: error: 'ha_rows' does not name a type
> > ha_memcache.h:167: error: expected ',' or '...' before '*' token
> > ha_memcache.h:169: error: ISO C++ forbids declaration of 'key_range'
> > with no type
> > ha_memcache.h:178: error: 'TABLE' has not been declared
> > ha_memcache.h:179: error: 'HA_CREATE_INFO' has not been declared
> > ha_memcache.h:181: error: ISO C++ forbids declaration of
> > 'THR_LOCK_DATA' with no type
> > ha_memcache.h:181: error: expected ';' before '*' token
> > ha_memcache.h: In member function 'ulong
> > ha_memcache::index_flags(uint, uint, bool) const':
> > ha_memcache.h:110: error: 'HA_ONLY_WHOLE_INDEX' was not declared in
> > this scope
> > ha_memcache.h: In member function 'uint
> > ha_memcache::max_supported_record_length() const':
> > ha_memcache.h:132: error: 'HA_MAX_REC_LENGTH' was not declared in
> > this scope
> > ha_memcache.h: In member function 'int
> > ha_memcache::index_next(unsigned char*)':
> > ha_memcache.h:163: error: 'HA_ERR_END_OF_FILE' was not declared in
> > this scope
> > /usr/local/mysql/include/my_dir.h: At global scope:
> > /usr/local/mysql/include/my_dir.h:95: error: 'myf' has not been
> > declared
> > /usr/local/mysql/include/my_dir.h:97: error: 'myf' has not been
> > declared
> > /usr/local/mysql/include/my_dir.h:98: error: 'myf' has not been
> > declared
> > ha_memcache.cc:41: error: expected initializer before '*' token
> > ha_memcache.cc:45: error: 'handlerton' was not declared in this scope
> > ha_memcache.cc:45: error: 'hton' was not declared in this scope
> > ha_memcache.cc:46: error: 'THD' was not declared in this scope
> > ha_memcache.cc:46: error: 'thd' was not declared in this
> > scop..............
> >
> > Thanks,
> >
> > Arun Singhal
> > Software Engineer
> > MPS Technologies (A Macmillan company)
> >
> > Email: [EMAIL PROTECTED]
> > Web: www.mpstechnologies.com
> >
> > Mail: MPS Technologies, 3A, 4th & 5th Floors, DLF Corporate Park,
> > Gurgaon 122 002, Haryana, India
> >
> > -----Original Message-----
> > From: Brian Aker [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 12, 2008 6:07 PM
> > To: Henrik Schröder; Arun Singhal
> > Cc: <memcached@lists.danga.com> list
> > Subject: Re: memcache as database
> >
> > Hi!
> >
> > On Jun 12, 2008, at 5:08 AM, Henrik Schröder wrote:
> >
> > > ...and you can not load these rows directly into your application,
> > > do the manipulation, and then store the results in another db table
> > > because...? I'm totally not seeing what use you have for an external
> > > cache like memcached in this case, where you only load the data from
> > > the database once. Or am I missing something?
> >
> > It looks like just using a plain old memory table would be faster. The
> > only reason I could think of to use memcached for this would be if the
> > data set was so large that using a distributed table made sense (aka
> > get more memory from aggregating multiple machines).
> >
> > But for ip's.... that would have to be more then what this person has.
> >
> > Cheers,
> >       -Brian
> >
> >
> > --
> > _______________________________________________________
> > Brian "Krow" Aker, brian at tangent.org
> > Seattle, Washington
> > http://krow.net/                     <-- Me
> > http://tangent.org/                <-- Software
> > _______________________________________________________
> > You can't grep a dead tree.
> >
> >
>
> --
> _______________________________________________________
> Brian "Krow" Aker, brian at tangent.org
> Seattle, Washington
> http://krow.net/                     <-- Me
> http://tangent.org/                <-- Software
> _______________________________________________________
> You can't grep a dead tree.
>
>
>
>

Reply via email to