thank you
- Original Message -
From: "Jay Pipes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, March 06, 2007 4:29 AM
Subject: Re: help me optimize this "ALL"
> No, because you have no WHERE condition.
>
No, because you have no WHERE condition.
wangxu wrote:
> sql:
>
> SELECT *
> FROM table_one INNER JOIN table_one table_one1 ON table_one1.column_one =
> table_one.column_two
>INNER JOIN table_one table_one2 ON table_one2.column_one =
> table_one.column_three
Thanks for the casting tip.
Dan Buettner-2 wrote:
>
> Andrew, couple of suggestions:
>
> 1 - where you use
> s.status='2'
> change it to
> s.status=2
> otherwise MySQL is likely casting your data from int to string, which
> is slow and also precludes using an index.
>
> 2 - in this case, inst
Andrew, couple of suggestions:
1 - where you use
s.status='2'
change it to
s.status=2
otherwise MySQL is likely casting your data from int to string, which
is slow and also precludes using an index.
2 - in this case, instead of using a left join, try using a subquery:
WHERE ...
AND s.mid NOT IN
--- EXPLAIN ---
1 SIMPLE e system cid NULL NULL NULL 0 const row not found
1 SIMPLE s ref sid,status,timeframe status 4 const 20438 Using where; Using
temporary; Using filesort
1 SIMPLE m eq_ref PRIMARY,status PRIMARY 4 sc_72.s.mid 1 Using where
--- members ---
id int(20) No
first varchar
Andrew, can you post the result of EXPLAIN for your query?
Minus the "FORCE INDEX" too. Also the structure of the other 2 tables
would be helpful as well.
Thanks,
Dan
On 1/22/07, altendew <[EMAIL PROTECTED]> wrote:
--- ptsSignups --
id int(20) No
mid int(20) No 0
ptsID int(20) No 0
pps dou
Yes, the two examples are equivalent.
"UNLOCK TABLES releases any locks held by the current thread. All tables
that are locked by the current thread are implicitly unlocked when the
thread issues another LOCK TABLES..."
So there is a hole there with either example. In order to keep others from
ch
Hi,
I would use a (source,stamp) index, and not a (stamp,source) index to
solve the performance problem.
Jocelyn Fournier
www.mesdiscussions.net
> Brian, can you post the output of EXPLAIN for your query?
> I.e.,
> EXPLAIN ;
>
>
> At first glance, your query should be able to use the 'stamp
Brian, can you post the output of EXPLAIN for your query?
I.e.,
EXPLAIN ;
At first glance, your query should be able to use the 'stamp-source'
index since stamp is the first column indexed. However, I wonder if
wrapping the "NOW() - INTERVAL 14 DAY inside a "DATE()" would help.
MySQL may be ca
-Original Message-
From: Brian Dunning [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 07, 2007 1:12 PM
To: mysql
Subject: Help optimizing this query?
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from i
Brian Dunning wrote:
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from ip_addr where
stamp>=NOW()-interval 14 day and source='sometext' group by stamp
order by stamp desc;
Here is the table:
CREATE TABLE `ip_
VeeJay wrote:
I am a novice with Unix and user of MySQL on windows…..
I have a problem, i.e.
I want to install MySQL5.0 at my FreeBSD 6.1 box with following
configurations:
--prefix=/usr/local/mysql
--with-mysqld-user=mysql
--with-unix-socket-path=/tmp/mysql.sock
--with-mysqld-ldflags
Mathieu,
The old_passwords option only changes how mysqld generates new
passwords. If old_passwords=0 when you create a new user mysql will
generate a long password that will only accept clients using the newer
protocol (and client lib). When old_passwords=1 mysql will generate
the older shorter
I may not be totally right but :
1) Well it all depends of which client library they are using if they
are using the old library yes
2) Well if that client use the old libraby yes ... (btw you can check
the password field in the mysql.user table to view the difference =>
they have a different for
You are better off doing the following
DROP TABLE IF EXISTS users_new;
CREATE TABLE users_new (
uname varchar(20) NOT NULL default '',
passwd varchar(15) NOT NULL default '',
fname varchar(25) NOT NULL default '',
lname varchar(40) NOT NULL default '',
dir varchar(28) NOT NULL default ''
20, 2006 1:53 PM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: help with query: select customers that ARO NOT
in orders table
On Fri, 20 Oct 2006, [EMAIL PROTECTED] wrote:
hi to all,
I have table customers (PK cust_id)
I have table orders (PK order_id, FK cust_id)
I need query t
, CT 06032
860.674.8796 / FAX: 860.674.8341
> -Original Message-
> From: Waldemar Jankowski [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 20, 2006 1:53 PM
> To: [EMAIL PROTECTED]
> Cc: mysql@lists.mysql.com
> Subject: Re: help with query: select customers that ARO NOT
On Fri, 20 Oct 2006, [EMAIL PROTECTED] wrote:
Ok. Just found I gave wrong info. To make my life easier, the person who
created db named cust_id in 'orders' table as SoldTo
[EMAIL PROTECTED]
in this case,
select cust_id from customers
where cust_id not in
(select Soldto from orders);
will no
Ok. Just found I gave wrong info. To make my life easier, the person who
created db named cust_id in 'orders' table as SoldTo
[EMAIL PROTECTED]
in this case,
select cust_id from customers
where cust_id not in
(select Soldto from orders);
will not work
:(
> On Fri, 20 Oct 2006, [EMAIL P
On Fri, 20 Oct 2006, [EMAIL PROTECTED] wrote:
hi to all,
I have table customers (PK cust_id)
I have table orders (PK order_id, FK cust_id)
I need query that will selecct all customers from 'customers' they don't
have any order, there is not their cust_id in 'orders'.
couls somebody help me?
t
r table.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
> -Original Message-
> From: Ferindo Middleton [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 14, 2006 9:16 PM
> To: Dan Buettner
> Cc: my
ble.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
> -Original Message-
> From: Ferindo Middleton [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 14, 2006 9:16 PM
> To: Dan Buettner
> Cc
Good call on the WHERE email_address IS NULL thing. Also occurs to me
you could do a SELECT DISTINCT instead of just a SELECT to eliminate
duplicate update commands.
Glad this was useful.
Dan
On 10/14/06, Ferindo Middleton <[EMAIL PROTECTED]> wrote:
Thanks Dan. This does help. This a pretty
Thanks Dan. This does help. This a pretty straight-forward idea. I could
even save the results of this query to a text file and possibly review it a
little before running it so I don't acidentally do anything funky and I
could see the impact this would have on the data before applying it. I think
Ferindo, I had a similar task recently, and the problem you'll run
into is that you can't select from and update the same table at once.
What I ended up doing was doing a SELECT to build the update queries
for me.
Something like this:
SELECT CONCAT(
"UPDATE bowler_score SET email_address = '", em
Hi,
I'm including your post to the forum as well.
The problem I think is the fact that you need to
do LEFT JOIN in two directions which quite often
don't turn out what you want.
So what you can do is to do two queries, UNION
them together and form a derived table that you
then do your final SELECT
hey thx for the reply..
here's my query..
http://forums.mysql.com/read.php?20,119150,119150#msg-119150
thx.
yashesh bhatia.
On 10/4/06, Rob Desbois <[EMAIL PROTECTED]> wrote:
Yes, ask away :)
> Hi,
Is the the right group to post for questions with SQL Queries ?
thx.
yashesh bhatia
--
Yes, ask away :)
> Hi,
Is the the right group to post for questions with SQL Queries ?
thx.
yashesh bhatia
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
_
Okay all seems to be fine now. All I did was restart the server for the 2nd
time
And now it seems to connect to mysql. Whew! I was starting to panic there.
-Original Message-
From: nngau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 3:42 PM
To: mysql@lists.mysql.com
Subject:
n Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
-Original Message-
From: Xiaobo Chen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 10:09 AM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: Help for query
I found if I divided into 2 steps, I will find the reco
I found if I divided into 2 steps, I will find the record in table B:
Ta - the given timestamp from table A;
1) select min(abs(Ta - timestamp)) as min_t from B;
2) select * from B where (timestamp + min_t = Ta) or (timestamp - min_t =
Ta);
But, how can I make these 2 steps into 1 query?
Thanks
Global Information Incorporated
> 195 Farmington Ave.
> Farmington, CT 06032
>
> 860.674.8796 / FAX: 860.674.8341
>
> -Original Message-
> From: Xiaobo Chen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 26, 2006 10:09 AM
> To: [EMAIL PROTECTED]
> Cc: mysql@lists.mys
Hi,
Try with FULLTEXT search. Alter the table to make the search columns as
FULLTEXT columns, with MyISAM engine and retrieve the records using MATCH
keyword.
Ref:http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Thanks,
ViSolve DB Team.
- Original Message -
From: "Ed Curt
Have you dumped out your variables to make sure none of them is a
zero-length string? That would surely cause your problem.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
-Original Message-
From: Ed Curt
Hi,
Protect your database
http://www.php.net/manual/en/function.htmlspecialchars.php
PHP Security Consortium http://phpsec.org/
Protect SQL Injection Attack
See more
http://www.php.net/manual/en/function.mysql-real-escape-string.php
The query sent to
#x27;email1'],$_post['email2'],$_POST['$web'],$_POST['casilla'],$_POST['observaciones'])";
-Original message-----
From: Marcelo Fabiani [EMAIL PROTECTED]
Date: Fri, 01 Sep 2006 15:27:19 -0300
To: Jerry Schwartz [EMAIL PROTECTED]
Subject: Re: h
I am not able to install Mysql on my 2003 server at home.
error 1045!!
I get an accesd denied for user [EMAIL PROTECTED]
I need the full error, but have some questions:
1. Are you sure that you set a root password?
2. Are you using the command line client or some other administrative tool?
Chris W escribió:
Marcelo Fabiani wrote:
Here is the code: . . .
$result = mysql_query($sq)or die ("problema Leyendo Tabla");;
. . .
Why are there two ; at the end of that line? I'm really not sure what
if anything that will do but I would remove it just in case.
Also are there an
Marcelo Fabiani wrote:
Here is the code: . . .
$result = mysql_query($sq)or die ("problema Leyendo Tabla");;
. . .
Why are there two ; at the end of that line? I'm really not sure what
if anything that will do but I would remove it just in case.
Also are there any triggers on this
John Meyer escribió:
Try this
$retval = mysql_query($sql) or die(mysql_error())
To at least get an idea of what MySQL thinks is the error.
The is no error in the insert it adds the row, but in addition add's two
more rows with no data, only the auto_increment ;
Example:
Adds
1 Marcelo
> [EMAIL PROTECTED] escribió:
>> Marcelo,
>>
>> The usual advice is to echo out the query string and examine it for
syntax.
>> Assuming it has form data in it for the variables, then try
copying/pasting
>> it into the mysql client and run it from there. Let us know how that
goes.
>>
>> David
>>
>
[EMAIL PROTECTED] escribió:
Marcelo,
The usual advice is to echo out the query string and examine it for syntax.
Assuming it has form data in it for the variables, then try copying/pasting
it into the mysql client and run it from there. Let us know how that goes.
David
Already done that
Marcelo,
The usual advice is to echo out the query string and examine it for syntax.
Assuming it has form data in it for the variables, then try copying/pasting
it into the mysql client and run it from there. Let us know how that goes.
David
--
MySQL General Mailing List
For list archives:
Jerry Schwartz escribió:
I don't see the form.
Unless one of your included files sets the values of your variables, this
code will insert a row of empty strings every time it executes.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.879
I don't see the form.
Unless one of your included files sets the values of your variables, this
code will insert a row of empty strings every time it executes.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
---
On 8/22/06, Karl Larsen <[EMAIL PROTECTED]> wrote:
$ mysqladmin -U make new password for root doesn't work.
can you copy the error?
if you want to set the root password you can use
mysqladmin -u root password "newpwd"
--
http://www.obed.org.mx ---> blog
--
MySQL General Mailing List
For li
On Tuesday 22 August 2006 10:37, Peter Lauri wrote:
> Don't have any recent, or actually I do not know, because I am not in
> charge of the hosting part of this, only access to upload scripts and
> control MySQL via phpMyAdmin.
>
> :(
A good backup is always a good thing. I dump my databases every
Not the best start to the day, if you have a fairly recent backup and
have enabled binary logging then you can recover up to the point before
you screwed the data.
Peter Lauri wrote:
Hi,
I did something terrible similar to UPDATE table SET testdate=NOW()
And I kind of forgot the WHER
PM
To: mysql@lists.mysql.com
Subject: Re: HELP!
On Tuesday 22 August 2006 10:29, Peter Lauri wrote:
> Hi,
> I did something terrible similar to UPDATE table SET testdate=NOW()
> And I kind of forgot the WHERE lalalala, so now all my records are
screwed.
> Is there any way of actu
On Tue, 22 Aug 2006, Peter Lauri wrote:
> Hi,
>
> I did something terrible similar to UPDATE table SET testdate=NOW()
>
> And I kind of forgot the WHERE lalalala, so now all my records are screwed.
>
> Is there any way of actually undoing this? :)
Recover from your backup.
--
patrik_wallstro
On Tuesday 22 August 2006 10:29, Peter Lauri wrote:
> Hi,
> I did something terrible similar to UPDATE table SET testdate=NOW()
> And I kind of forgot the WHERE lalalala, so now all my records are screwed.
> Is there any way of actually undoing this? :)
Backup?
--
Jørn Dahl-Stamnes
homepage: htt
. I really appreciate your
help.
Jesse
- Original Message -
From: Douglas Sims
To: Jesse
Cc: MySQL List
Sent: Monday, August 21, 2006 12:07 PM
Subject: Re: Help with query
I think you are trying to use a regular expression in the like phrase. I
wasn't aware that MS SQL
I think you are trying to use a regular expression in the like
phrase. I wasn't aware that MS SQL can do regular expressions at
all? I've been using 2000 - perhaps the newer version can?
In MySQL, instead of saying:
LA.LastName LIKE '[A-E]%'
try this:
LA.LastName REGEXP '^[A-E]'
You can
[ always cc the list so others can share the fix or make appropriate
comments ]
Nicholas Wyatt wrote:
hi chris,
thanks for answering! however, i do already have indexes on those
columns. all my tables use the myisam storage engine. what are the
differences you mentioned between these engines w
Nicholas Wyatt wrote:
Hello to all!
has anybody got any ideas how i can speed up the following query?
it's so awfully slow (about 1 second).
the "test_item" table is the main problem. currently, it has
about 108.000 entries.
is it normal that it takes so long? and if it isn't, how can i
optimi
if i search for any process running i am getting following thing.
[EMAIL PROTECTED] mysql]# ps -ef | grep mysqld
root 18389 1 0 13:09 pts/300:00:00 /bin/sh /usr/bin/mysqld_safe
--defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
mysql18422 18389 0 13:09 pts/300
I am unable to start server after shifting to new location.
i tried to start 'mysqld' but it was failed. A blank mysql.sock file is
creating. Entries of log files are also not reporting any problem.
Hi All,
Thank you for u r reply. But i am unable to find my.cnf, is i need to create
this file.
Hello,
You can change the MySQL data path in /etc/my.cnf by editing the
configuration parameter "datadir" with new data path. Once you done the
changes in my.cnf, reboot the MySQL server.
Thanks,
ViSolve DB Team
- Original Message -
From: "balaraju mandala" <[EMAIL PROTECTED]>
To
On 8/19/06, balaraju mandala <[EMAIL PROTECTED]> wrote:
Hi Everybody,
I need small help from you. In my Linux box i have limitation of Size in
partition. I have only 5 GB space for /var. MySQL is installed in this
partition only. I want to give another path like /home, where i have 120GB
of spac
Kay C. Tien wrote:
At 05:37 PM 7/17/2006 Monday, Chris wrote:
Kay C. Tien wrote:
Hi All,
The simple script I'm testing works on a Linux server. I got tired
of having to upload and test them, so I decided to install MySQL on
my computer, which is running Win XP.
MySQL works fine on it's own,
At 05:37 PM 7/17/2006 Monday, Chris wrote:
Kay C. Tien wrote:
Hi All,
The simple script I'm testing works on a Linux server. I got tired
of having to upload and test them, so I decided to install MySQL on
my computer, which is running Win XP.
MySQL works fine on it's own, I've set the the dat
At 05:37 PM 7/17/2006 Monday, Chris wrote:
Kay C. Tien wrote:
Hi All,
The simple script I'm testing works on a Linux server. I got tired
of having to upload and test them, so I decided to install MySQL on
my computer, which is running Win XP.
MySQL works fine on it's own, I've set the the dat
Kay C. Tien wrote:
Hi All,
The simple script I'm testing works on a Linux server. I got tired of
having to upload and test them, so I decided to install MySQL on my
computer, which is running Win XP.
MySQL works fine on it's own, I've set the the database and etc., but
nothing happened whe
Hi,
The table has ~2 million records and has 3 columns one of which is a text
field which on an average has 2000 characters(English alphabets, space are
there for now, but if required can be eliminated).
eg: "adfastsdfasgadfdfdsaffagdasfd adfsadfadsgdsfdfsdfsgsdfdsg fg adfafg
adfddfgadsfdsgfghfg
kevin vicky wrote:
Hi,
I am trying to use locate() function to get position of a substring in a
text field which on average has 2000 characters and the search substring is
30 -50 characters long. The table has around 2 million records and looking
for a efficient way to do the search. I tried ful
Hi Byron,
This should be a relatively simple question but after looking through
the manual for a while I didn't see how to do it. I am working in php
and need to store a large binary number in the database. When I try and
convert it to a int in php its too big so it converts it to a float and
I
Nhadie,
...what i want to actually achieve is to get only the time of the first
INVITE and then it's corresponding BYE
so it should look like this
+--+--+--+--+--+--+
| username | t1method | t2method | start| stop | timediff |
+-
Thanks Peter,
That looks pretty good to me. I never would have figured that out on
my own.
Dan T
On Jun 1, 2006, at 4:06 PM, Peter Brawley wrote:
Dan,
>I want to get a particular users 'rank' or row number from the query.
SELECT 1+COUNT(*) AS Rank
FROM results r1
INNER JOIN results r2 O
You could use the mysql CAST or CONVERT functions
Byron.Albert wrote:
Hey all,
This should be a relatively simple question but after looking through
the manual for a while I didn't see how to do it. I am working in php
and need to store a large binary number in the database. When I try and
co
Dan,
>I want to get a particular users 'rank' or row number from the query.
SELECT 1+COUNT(*) AS Rank
FROM results r1
INNER JOIN results r2 ON r1.points
I have a regular query lets say:
SELECT user, points FROM results ORDER BY points DESC
so I get:
userpoints
---
john23
s
Dan wrote:
I have a regular query lets say:
Better to show the real query, rather than a simplified version. Simplified
requests get you simplified answers. What seems like a simplification to you,
may in fact hide a crucial piece of information, thus preventing anyone from
giving you a so
Hi Manuel,
I had a similar problem a few months ago and I found 'somewhere' in the
documentation
a post by Matthew van Os on May 27 2005, saying:
The CursorLocation should be of the type "adUseClient" instead of
"adUseServer".
The adUseServer returns a -1 as recordcount.
The adUseClient retur
select count(*), substring(timeofclick,1,7) from MTracking where
mallarea=1001 group by 2;
On 5/3/06, Randy Paries <[EMAIL PROTECTED]> wrote:
Hello,
Not sure if i can do this.
I have a table with a datetime column
I would like to do group by a day of the month.
if i do something like
sel
try:
group by substring(timeofclick,1,10)
-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 11:25 AM
To: mysql@lists.mysql.com
Subject: Help with this query. How to do a group by on a datetime just
the month/day/year
Hello,
Not sure if i ca
Guys,
So many thanks for you kind help. I was able to find the culprit, just
adding 1 index i can get as fast as 30 thousands record per hour. So that I
can proccess 2 million data in about 4 days only.
But now, after my main tables loaded with more than 2 million data (2,9
million), i have an
bject: Re: HELP --- Slow SP
> > CREATE TABLE `his_msisdn_imei_activ_hist` (
> > `MSISDN` varchar(23) NOT NULL,
> > `ACTIV_IMEI` varchar(20) NOT NULL,
> > `ACTIV_PHONE_TYPE` varchar(100) NOT NULL,
> > `PREV_IMEI` varchar(20) default NULL,
> > `PREV_PHONE_TYPE` v
--- Daevid Vincent <[EMAIL PROTECTED]> wrote:
> Well I think this is mostly working. I have a 'NULL' user ID which is
> 'system' that I need to get into here, but I think I'm mostly on
> track...
>
> There are lots of ways to accomplish this task it seems. ALL of which
> would
> be so much easi
On Fri, 2006-04-28 at 00:13 -0700, Daevid Vincent wrote:
> The problem is now that I can't get the right data.
>
> mysql> select max(created_on), user_id, id from logs group by user_id;
> +-+-++
> | max(created_on) | user_id | id |
> +-+
|
| 431 | 2 | 2006-04-27 22:18:35 | Viewed Users Stats | bob |
+-+-+-++--+
From: Alex Arul [mailto:[EMAIL PROTECTED]
Sent: Friday, April 28, 2006 2:18 AM
To: D
> > CREATE TABLE `his_msisdn_imei_activ_hist` (
> > `MSISDN` varchar(23) NOT NULL,
> > `ACTIV_IMEI` varchar(20) NOT NULL,
> > `ACTIV_PHONE_TYPE` varchar(100) NOT NULL,
> > `PREV_IMEI` varchar(20) default NULL,
> > `PREV_PHONE_TYPE` varchar(100) default NULL,
> > `ACTIV_TIME` datetime NOT NULL,
> >
> Thanks Alex, that got me started. I don't understand why I
> had to use "IN"
> when the example uses "=" but at least it kinda works...
>
> The problem is now that I can't get the right data.
>
> mysql> select max(created_on), user_id, id from logs group by user_id;
> +-+-
> -Original Message-
> From: Alex Arul [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 27, 2006 11:28 PM
> To: Daevid Vincent
> Cc: mysql@lists.mysql.com
> Subject: Re: Help with subqueries...
>
> On 4/28/06, Daevid Vincent <[EMAIL PROTECTED]> wrote:
&
On 4/28/06, Daevid Vincent <[EMAIL PROTECTED]> wrote:
>
> vmware reviewit # mysql --version
> mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline
> 5.1
>
> Given two tables:
>
> CREATE TABLE `logs` (
> `id` bigint(20) unsigned NOT NULL auto_increment,
> `user
Bennett; mysql@lists.mysql.com
Subject: Re: HELP --- Slow SP
Hi,
When I used the EXPLAIN command, i see that all of my query are using the
correct index. That's why i was quite sure that index won't be the cause of my
slow query problem.
So, i now should alter the table: remove prima
Hardi OK wrote:
Hi,
When I used the EXPLAIN command, i see that all of my query are using
the correct index. That's why i was quite sure that index won't be
the cause of my slow query problem.
So, i now should alter the table: remove primary key and recreate index?
If your queries are us
Hi,
When I used the EXPLAIN command, i see that all of my query are using the
correct index. That's why i was quite sure that index won't be the cause of
my slow query problem.
So, i now should alter the table: remove primary key and recreate index?
Many thanks,
Hardi
On 4/28/06, Daniel Kasak
Quentin Bennett wrote:
I think that you can use the left most columns of the index, without including
the remainder.
That's wasn't my understanding of how things work, but I've just checked
the documentation, and it looks like you're right:
MySQL cannot use a partial index if the colum
[snip]
Next point is that MySQL will only make use of an index in a join or a
where clause if ONLY that field is included in the index. If you pack 3
fields into an index and then try to join on ONLY ONE field, the index
can't be used. So look at your joins and where clauses and make sure
your
Hardi OK wrote:
Hi Forums,
I have a frustrating problem on my Stored Procedure. It can only proccess
about 100 records in 10 minutes. I have 2 million initial records that need
to processed. Meaning that with this speed i will around 200 days to finish
all of them.
To make it worse, the data its
--- Chris <[EMAIL PROTECTED]> wrote:
> I want to create a SELECT statement using BETWEEN like:
> SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The
> field
> I'm applying my BETWEEN clause is a varchar.
>
> Now, if value_1 and value_2 are numbers the select statement works a
On Tuesday 25 April 2006 09:33 am, Chris wrote:
> I want to create a SELECT statement using BETWEEN like:
> SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The field
> I'm applying my BETWEEN clause is a varchar.
> If the appropriate format (enclosing or not enclosing with apostr
If you do an INSERT and you generate an new number in an AUTO_INCREMENT
field the new value generated can be retrieved using:
*SELECT LAST_INSERT_ID();*
You are not required to retrieve into the application and then use it back
in another SQL statement... you can use user variables:
*SELECT @lastG
>-Original Message-
>From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 13, 2006 11:48
>To: Jeff
>Subject: Re: Help regarding a simple query
>
>
>Hi Jeff,
> This is venu again.Last mail i did not include a constraint that is
what irritatin
Now i need to get all the records which consists of the string
venu(case should not be considered either case should be).i.e i should get
1,2,3,4,5,8 records
A simple way is ...
...
WHERE LOCATE('venu', col_name ) > 0
...
or if the column is [VAR]BINARY, LOCATE('venu',CAST(col_name
> -Original Message-
> From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 13, 2006 10:33
> To: mysql@lists.mysql.com
> Subject: Help regarding a simple query
>
>
> Hi,
> I am searching for a query where i can have pattern
> matching without considering the cases.
Cory at SkyVantage <[EMAIL PROTECTED]> wrote on 03/10/2006 04:25:00 PM:
> [EMAIL PROTECTED] wrote:
> > Can you post the results of "SHOW CREATE TABLE pnr_segments", please
>
> pnr_segments | CREATE TABLE `pnr_segments` (
> `ID` bigint(20) NOT NULL auto_increment,
> `ID_pnr` bigint(20) NOT NUL
Cory at SkyVantage wrote:
gerald_clark wrote:
How many possible values may res_status have? What percentage for
each value? It may not be possible to use an index on this field.
The res_status field may have up to 10 different values from 0-9. and
there will be a huge amounts of '0' and
gerald_clark wrote:
How many possible values may res_status have? What percentage for
each value? It may not be possible to use an index on this field.
The res_status field may have up to 10 different values from 0-9. and
there will be a huge amounts of '0' and thousands of records with 1-9
[EMAIL PROTECTED] wrote:
Can you post the results of "SHOW CREATE TABLE pnr_segments", please
pnr_segments | CREATE TABLE `pnr_segments` (
`ID` bigint(20) NOT NULL auto_increment,
`ID_pnr` bigint(20) NOT NULL,
`ID_pnr_fares` bigint(20) NOT NULL,
`flight_number` int(10) unsigned NOT NULL,
`
301 - 400 of 1666 matches
Mail list logo