Can someone suggest me.. ?
To make a keyword search from a specific field from a Table that have
millions of rows.
I used normal SQL query as follow
SELECT `field1`,`field2`,`field3` FROM 'table' WHERE `field5` LIKE
'%keyword%1' AND `field5` LIKE '%keyword2%'
(Field 5 is text and not an index
On 8/7/07, Tharabar [EMAIL PROTECTED] wrote:
SELECT `field1`,`field2`,`field3` FROM 'table' WHERE `field5` LIKE
'%keyword%1' AND `field5` LIKE '%keyword2%'
The most trivial way to speedup a query is to add an index on the columns
that are being used in the where clause. But doing 'LIKE'
I would like to empty the slow query log without restarting MySQL.
If I simply delete lines, the server will no longer write to the file. I have
tried leaving the header, but still no writes unless I restart MySQL.
I am on RHEL4.
The group and owner of the file are correct:
4 -rw-rw
Hi, I'm looking for some basic help. I am developing a MySQL database and
want to auto increment a field, but I don't want it to just count 1,2,3,
etc. I want the field to be a combination of letters and numbers, at least 8
digits long, completely random for security porposes, but do this
You can do that using a before insert trigger, something like (untested) :
CREATE TRIGGER test1bi
BEFORE INSERT ON test1
FOR EACH ROW BEGIN
NEW.ID = COALESCE( NEW.ID, SHA1(CAST(RAND() AS CHAR)))
END;
2007/8/7, shivendra [EMAIL PROTECTED]:
Hi, I'm looking for some basic help. I am
Having a moment of altruism, I started doing the survey only to find that
it wouldn't let me advance to the next page (from either page 1 or page 2,
can't recall). I kept getting an error of an answer is required of this
question even when I had provided one. No good deed goes unpunished
You are more altruistic than I can ever be.
Every time I go through a nameless fast-food drive-through (too often, based
on my girth), they offer me a chance to win $1,000 if I complete a survey.
I never take those surveys.
Reasons:
a)If, for example, 10,000 people take the survey and the
I received the same as David. The question was:
What OS do you currently use? Please check all that apply: (page 3, question 4
or 5):
I chose Linux 2.6.x and Windows. It kept telling me that I needed to answer the
question.
I changed the answer to just Linux and it let me
Isn't there a chance that you could get a ID that is the same as one
already in use? and if this happens what happens on the insert?
Wishing you the best you know you deserve,
__
Lucas Heuman
Web Developer
Ricomm Systems Inc.
FAA, WJHTC/Bldg 300, 3nd Fl., L33
Atlantic City
You might not need to do this in the way you are suggesting (depending on
your application). I'm not sure why you feel you need to combine the
autoincrement with the hash into the same field. Does it really do harm if
two records have the same hash?
It might work as well to have two separate
Shivendra:
It looks to me based on your example that you are creating a smart field
where the first three chars are some sort of category and the numeric part is
random. If you example is accurate then a char(3) field and a standard
auto_increment field will do the trick. If uniqueness is
On 8/7/07, Boyd Hemphill [EMAIL PROTECTED] wrote:
Suggestions to use a hash are a problem because once you have a few
million rows the likelihood of a collision is quite high if you cannot
afford an error stopping your application. This means that if you write a
trigger (the obvious way to
Thanks for the input! Hopefully, I've fixed the problem.
Please retry. It should have saved your previous answers.
Thanks much!
Jay
J.R. Bullington wrote:
I received the same as David. The question was:
What OS do you currently use? Please check all that apply: (page 3,
On 8/7/07, Boyd Hemphill [EMAIL PROTECTED] wrote:
I would like to empty the slow query log without restarting MySQL.
If I simply delete lines, the server will no longer write to the file. I
have tried leaving the header, but still no writes unless I restart MySQL.
I am on RHEL4.
The group
14 matches
Mail list logo