[wp-hackers] set/modify the auto-incrementing ID of the p_postmeta.
Cornelius, Gregory
gcorne at bu.edu
Tue Aug 14 11:17:05 UTC 2012
This is not 100% accurate. You can create an index, but you need to specify the length. The index won't speed up LIKE clauses, but most meta queries are using WHERE often with '='.
CREATE INDEX postmeta_prefix ON wp_postmeta (meta_value(20));
On Aug 13, 2012, at 5:14 PM, Scott Taylor <scott.c.taylor at mac.com> wrote:
> LONGTEXT can't be indexed, InnoDB doesn't have full-text search. Welcome to hell.
>
> --
> Scott Taylor
> Musician / Software Engineer
> 160 West End Ave #2H
> New York, NY 10023
>
>
> On Monday, August 13, 2012 at 5:12 PM, Haluk Karamete wrote:
>
>> Is it OK to index the meta_value field of the wp_postmeta?
>> According to phpmyadmin, meta_id, post_id and meta_key are already indexed.
>> I'm sure there must be a good reason for meta_value to come not indexed.
>>
>> But what if you want indexed.
>> With 32M recs in it now, I'm getting no response from the phpmyadmin
>> when I query meta_value for a specific value.
>> post_id, meta_id takes about 0.0X secs. querying meta_val simply times out.
>>
>> That brought the question, well, should we indexed the table? The only
>> field not indexed there is the meta_val.
>> Even if you go say to that? well, how am I gonna index that huge data.
>> It's already 5Gb.
>>
>> For sure, it will time out, if I try the running it from the command
>> line 9 which I do not know how to begin with ), how long would it
>> take? Will I be able to stop the process ( when started from the
>> command line ) in case it slows down database server effecting my
>> live web site.
>>
>>
>>
>> On Sat, Aug 11, 2012 at 1:43 PM, Otto <otto at ottodestruct.com (mailto:otto at ottodestruct.com)> wrote:
>>> On Sat, Aug 11, 2012 at 2:49 PM, Haluk Karamete <halukkaramete at gmail.com (mailto:halukkaramete at gmail.com)> wrote:
>>>> Wasn't there a trick to run the shell commands right from within a php
>>>> page thru the use of a back tick char?
>>>> would that do the trick of starting a php process from within a php
>>>> page rather than going to the console and starting it manually?
>>>>
>>>
>>>
>>> No. There's no good way to run a long running process via a web
>>> request. Nor would you really want to do so. Loads of bad karma lies
>>> down that path, friend.
>>>
>>> If this is a one time thing, then just run it from a direct shell. Fast, easy.
>>>
>>> If this is something generic that you'll have to do repeatedly from a
>>> web page, then rearchitect so that it keeps track of state, pulls
>>> small numbers at a time, and refreshes every so often to start the
>>> process back up to thus continue where it left off.
>>>
>>> -Otto
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list