On Sun, Jun 05, 2005 at 04:41:16PM -0700, sol beach wrote:
> IMO, you have much more a lively imagination than realistic, in depth
> & technical knowlege in either MYSQL or Oracle.
> Current production MYSQL does NOT have stored procedures.
Current production mysql doesn't, but current development
Sebastian wrote:
Cory Robin wrote:
I'm trying to return all records between two dates.. The fields are
datetime fields...
Which is better? The following or using BETWEEN? (A little lost here)
SELECT * FROM passengers WHERE
reservation_date_time >= '2005-01-01 12:10:00'
AND reservation_date
Sebastian wrote:
Ah.. OK. I'll give that a shot instead..
Also, now that i am doing some thinking on optimizing... should the $cat
clause be present first in the where clause? since it decides if it
should get results or not. for example:
WHERE MATCH(...) AGAINST(... IN BOOLEAN MODE) AND ('$
Greeting,
Is there any comprehensive documentation on "show Innodb status" command? I
found the mysql help page a bit short and the whole exercise has left me with
many questions unanswered hence any tips from pratical experience that would
help in Innodb performance tuning would be greatly app
hey all,
I'm trying to convince some people here to adopt MySql as a relational database
here. However, we can't start from a clean slate; we have a very mature oracle
database that applications point to right now, and so we need a migration path.
I was thinking of taking the following steps:
It's impossible to say pretty much without more information. Have you
checked the error log on the slave? How about 'SHOW SLAVE STATUS'? Did
your "backup guy" gzip all binlogs, if so that would most definitely stop
replication.
Atle
-
Flying Crocodile Inc, Unix Systems Administrator
On Fri, 3 Ju
Ronny,
I think this is actually quite simple. All of your statistic/information
says you are not closing the connection... so where in your code are you
closing the connection?
In one of my projects, I open the data manager as:
// open a MySql database
if (!(sock=mysql_init(0)))
{
_lclose(hfile
Cory Robin wrote:
I'm trying to return all records between two dates.. The fields are
datetime fields...
Which is better? The following or using BETWEEN? (A little lost here)
SELECT * FROM passengers WHERE
reservation_date_time >= '2005-01-01 12:10:00'
AND reservation_date_time <= '2005-05-0
I'm trying to return all records between two dates.. The fields are
datetime fields...
Which is better? The following or using BETWEEN? (A little lost here)
SELECT * FROM passengers WHERE
reservation_date_time >= '2005-01-01 12:10:00'
AND reservation_date_time <= '2005-05-01 12:10:00';
--
M
I added the line to the configuration file and removed "--log-error=" line
from startup line but it still creates the /usr/local/mysql/var/yoda2.err
as well as /var/log/mysql/error.log
I am assuming it is reading from my.cnf as I get the following when I run
"mysqladmin variables"
log_error
Michael Stassen wrote:
Sebastian wrote:
Michael Stassen wrote:
Now, I never said this couldn't be done in SQL. Assuming $cat is
already set, the statement in $sql below should do what you asked for:
$sql = "SELECT id, 'news' AS type, FROM news
WHERE ($cat = '' OR $cat
Thanks so far for your advice,
> Is it possible that your application doesn't close connection properly?
that is exactly what also I think is the problem's cause, but I am unable to
locate the place where it actually does happen. My code seems straightforward
and I had looked over it some other
Sebastian wrote:
Michael Stassen wrote:
Now, I never said this couldn't be done in SQL. Assuming $cat is
already set, the statement in $sql below should do what you asked for:
$sql = "SELECT id, 'news' AS type, FROM news
WHERE ($cat = '' OR $cat = 'news')
UNION
The reason i sthat you have not provided authorisation privileges to the
database or to the tables within the database for that user...
Very often we think granting all to the database is enough to make our app
work with a particular user - this may be true for some databases - but in
mysql you
Sebastian wrote:
Michael Stassen wrote:
So, why spend days trying to come up with complicated, ugly sql when
it can be done in 5 minutes with simple, easy-to-read php?
Michael
i only posted snip of the query.. it is much larger and complex than
just a SELECT. i am going MATCH, AGAINST, LE
Michael Stassen wrote:
[EMAIL PROTECTED] wrote:
Hi Sebastian;
There is always crazy things somewhere.
I'll give you two methods for that :
mysql> select id,'news' as selected, type from news
-> union select id,'faq' as selected, type from faq
-> union select id,'forum' as selected, ty
[EMAIL PROTECTED] wrote:
I agree with you,
just see that if ..
sql = "SELECT id, '$cat' AS type, ... FROM $cat";
is exactly what is done in prepare statement.
Yes, I acknowledged that in my next message (a reply to yours).
dynamic sql is better than application level statement preparation, w
[EMAIL PROTECTED] wrote:
Hi Sebastian;
There is always crazy things somewhere.
I'll give you two methods for that :
mysql> select id,'news' as selected, type from news
-> union select id,'faq' as selected, type from faq
-> union select id,'forum' as selected, type from forum;
+--+--
Hello.
Is it possible that your application doesn't close connection properly?
Check with netstat the states of connections between your application
and server. Run netstat on the server. Do you see some sleeping processes
with ps utility or 'mysqladmin processlist' command?
Ronny Mel
Hello.
Unfortunately I could give suggestion only about your second question.
Is it possible that /var/log/mysql/error.log created by mysqld_safe
(you're specifying it with --log-error command line option) and
/usr/local/mysql/var/yuda2.err is created by mysqld process if it
founds problems
Michael Stassen wrote:
Sebastian wrote:
Michael Stassen wrote:
Sebastian wrote:
i have a query with 3 union selects:
SELECT id, 'news' AS type, FROM news
UNION
SELECT id, 'faq' AS type, FROM faq
UNION
SELECT id, 'forum' AS type, FROM forum
which wor
Hi All,
I'm trying to connect to MySql server from MySql Administrator on a network
machine. I specify the Server host as IP of the machine where DB server is
running and Port as 3306.
Username as 'root' and the password
I have tried with other usernames and specifying machine name instead of
I agree with you,
just see that if ..
sql = "SELECT id, '$cat' AS type, ... FROM $cat";
is exactly what is done in prepare statement.
dynamic sql is better than application level statement preparation, when you use
stored procedure. but since this is the a habit in mysql, i'll keep this for
oracle
Sebastian wrote:
Michael Stassen wrote:
Sebastian wrote:
i have a query with 3 union selects:
SELECT id, 'news' AS type, FROM news
UNION
SELECT id, 'faq' AS type, FROM faq
UNION
SELECT id, 'forum' AS type, FROM forum
which works just fine and selects
Hi,
I have tried to simply the problem and it exists without any JOINs.
have you given the query ?
SELECT id FROM stuff ORDER BY stuffed_date DESC LIMIT 18, 10 -> .43 sec
SELECT id FROM stuff ORDER BY stuffed_date DESC LIMIT 0, 10 -> .0007 sec
have you described your tables ?
stuffed
Chris wrote:
I have been using LOAD DATA INFILE to load an ASCII data file into my
database. The datafile is uploaded to the server temp area and the name of
the file is passed to LOAD DATA INFILE query like:
LOAD DATA INFILE '/tmp/phpyxCoes' INTO TABLE LocationTEMPSR12 FIELDS
TERMINATED BY ','
But i give you a suggestion (theoritical) :
if data are reverse sorted , LIMIT 18, 10 will be LIMIt 2, 10
who knows ?
Mathias
Selon [EMAIL PROTECTED]:
> Hi,
> i and i think all people will think the same : i can't help. why ?
>
> have you described your tables ?
> have your given the si
Hi,
load data infile tries to load data from specified directory on the server.
if your file is on the client, try LOAD DATA LOCAL and verify the parameter
--enable-local-infile
more details are in http://dev.mysql.com/doc/mysql/en/load-data-local.html about
data on the web server.
Nota bene :
*
Hi,
i and i think all people will think the same : i can't help. why ?
have you described your tables ?
have your given the size of each table ?
have you list the indexes ?
have you specify the storage type ?
and
have you given the query ?
if you're looking for just a theoritical response, docs.m
When I do a SELECT using STRAIGHT JOIN against multiple tables where the
main table has about 200k rows, it is very fast retrieving the latest rows,
ie "LIMIT 0, 10", but extremely slow retrieving older rows, for example,
"LIMIT 18 , 10". Doing an EXPLAIN shows that no filesort or temporary
I have been using LOAD DATA INFILE to load an ASCII data file into my
database. The datafile is uploaded to the server temp area and the name of
the file is passed to LOAD DATA INFILE query like:
LOAD DATA INFILE '/tmp/phpyxCoes' INTO TABLE LocationTEMPSR12 FIELDS
TERMINATED BY ',' ENCLOSED BY '"'
Sebastian wrote:
I have two fields: topic | title
topic does not always have data in it, so i want to select `title` when
`topic` is null..
i thought i could do this (does not work):
IF(title IS NULL, topic, title) AS heading
Thanks.
There is nothing wrong with this, as long as it is par
Hello there -
I have a couple of questions regarding a new install of MySql 4.1.12 on RH
7.2. Being new to this list, I sure do hope this hasn't been covered
before. I have scrubbed Google and searched the archives for this list but
can't find an explanation or a solution to 2 issues:
1.
Dear all,
I have a problem with the mysql interface for c, which after a couple of
hours thinking about bad or faulty programming are eliminated with
probability almost 100%.
within a loop, I do a mysql_query(), which is executed and I poll the result
and everything is fine. Up to when
Dear all,
I have a problem with the mysql interface for c, which after a couple of
hours thinking about bad or faulty programming are eliminated with
probability almost 100%.
within a loop, I do a mysql_query(), which is executed and I poll the result
and everything is fine. Up to when m
Hello.
See:
http://dev.mysql.com/doc/mysql/en/access-denied.html
http://dev.mysql.com/doc/mysql/en/resetting-permissions.html
Seena Blace <[EMAIL PROTECTED]> wrote:
> [-- text/plain, encoding 8bit, charset: iso-8859-1, 17 lines --]
>
> Hi,
>
> I have been noticing followi
Hello.
Replication process runs tree threads, two on slave and one on master, so
if your master was running with no free space it's behavior unpredictable and
replication could halt. SHOW SLAVE STATUS usually reports errors. I would stop
replication and setup it again using, for example,
LOA
Hello.
In my replication setup with 4.1.11 master and 5.0.4 slave
CREATE TABLE and CREATE DATABASE statements are replicated
perfectly.
"Shannon R." <[EMAIL PROTECTED]> wrote:
> Hi All!
>
> I'm using the latest mysql 4.0.x and I've successfully
> set-up database replication on it
Dear all,
I have a problem with the mysql interface for c, which after a couple of
hours thinking about bad or faulty programming are eliminated with
probability almost 100%.
within a loop, I do a mysql_query(), which is executed and I poll the result
and everything is fine. Up to when
Hi All!
I'm using the latest mysql 4.0.x and I've successfully
set-up database replication on it over 2 machines.
I have noticed though that mysql doesn't seem to
replicate CREATE TABLE operations on the master to the
slave. Is this a limitation? Or I just missed
something. If so, can someone ple
The second method is dynamic sql with prepare statement from string.
It's better for the reason that the query is generated to retrieve data from
just one table (not an union which implies 3 tables).
The day your tables will be huge, i'm sure you will use the second method.
two crazy people can
> Hi all,
>
> I have been using /var/mysql/data as my data directory till now ,
> suddenly i realise its all filled up with some 20M left which will
> finish in a day or two , repartioning my disks is not an option , what
> do i do to restart mysql with a new data directory say
> /usr/local/mysql/d
42 matches
Mail list logo