  | | | MySQL General | 2007/8/15 B. Keith Murphy <kmurphy@(protected) >
> What operating system are you running and is it 32 or 64 bit?
>
Thanks for the reply.
Here is my OS info
$ uname -r
2.6.9-42.ELsmp
$ cat /etc/reBeauford wrote
>
> delete from contacts where TO_DAYS(CURDATE()) - TO_DAYS(today) > 30 and
> status ! "Y "
Off-topic you 're defeating indexes with TO_DAYS(). If there 's an index
on the 'today 'It 's a database not a scripting language ... )
You can run a simple cron entry like this
0 4 * * * /path/to/mysql -u USER -pPASS -D DATABASE -e "delete from contacts
where TO_DAYS(CURDATE()) - TO > > I have been trying for days to find a simple command in
> MySQL where I
> > can automatically delete records based on some criteria after a
> > certain timeframe.
> >
> > I found this in the MHi
Beauford wrote
> Hi
>
> I have been trying for days to find a simple command in MySQL where I can
> automatically delete records based on some criteria after a certain
> timeframe.
>
> I founHi
I have been trying for days to find a simple command in MySQL where I can
automatically delete records based on some criteria after a certain
timeframe.
I found this in the MySQL manual but I gReally probably not the best list for this.
But if it were up to me..I would use CentOS/RedHat Enterprise Linux or Debian.
Keith
----- Original Message -----
From "john_sm " <john_smith3853@(protected)What operating system are you running and is it 32 or 64 bit?
Keith
----- Original Message -----
From "Jen mlists " <practicalperl@(protected) >
To mysql@(protected)
Sent Tuesday August 14 > > MySQL doesn 't seem to be very smart about queries involving OR and
> > things like < >. For me creating temporary tables or writing perl
> > scripts to do the job solved my particular problems. But From explain you can see that your problem lies within the mensagens
table (the first entry from your explain query) where it says type
ALL and rows 68337. This basically means that it is not usI 've created an index with the statement
create index `usuario_pasta_situacao` on `mensagens` (codusuario codpasta
situacao)
And for mensagenspara table this index
create index `mensagem_usuario_The indexes are the primary way of tuning your query speed but bear in
mind that mysql can only use 1 index-per-table-per-query.. your
single column indexes do help some.
try an EXPLAIN to see whatwhat does explain tell you about the query?
I also think you should try a combined index with all three columns
that are used in one index. As far as I know only one index can be
used per query..hum... I get it.
But in my query I look in 3 tables
FROM
mensagens m
mensagenspara mp
usuarios u
usuarios up
WHERE
m.codmensagem mp.codmensagem
AND u.codusaurio m.codusuario
AND up.codusua$B$*@$OC$K$J$j$^$95HED$H? $7$^$9!#(B
$BAaB.$G$9$ (BMySQL(5.0)$B$X%m%0%$%s$G$-$ $$C$F$*$j$^$9!#(B
Access denied for user 'root '@ 'localhost ' (using password YES)
$B F% %C%H% "%C%W$b$+$J$i? '!9$$B$*@$OC$K$J$j$^$95HED$H? $7$^$9!#(B
$BAaB.$G$9$ (BMySQL(5.0)$B$X%m%0%$%s$G$-$ $$C$F$*$j$^$9!#(B
Access denied for user 'root '@ 'localhost ' (using password YES)
$B F% %C%H% "%C%W$b$+$J$i? '!9$First of all thanks for your attention guys
Rhys I 've tried UNION and UNION ALL statements too but I found some
problems when ordering the results. I 've tried order in each query and at
end - (SEStruggling with the Portuguese here but...
What kind of indexes do you have in place? Are the y appropriate?
I have had some success with removed or clauses from queries creating a new
query and joHi
I have a message system wich work in this way
- Each message can be sent to one or more recipients
- Each message received have a lot of settings like date and hour received
date and hour of rHi
I have a message system wich work in this way
- Each message can be sent to one or more recipients
- Each message received have a lot of settings like date and hour received
date and hour of rHi
I have a message system wich work in this way
- Each message can be sent to one or more recipients
- Each message received have a lot of settings like date and hour received
date and hour of rSorry
That was really hard to read. Here it is again
mysql > explain select fsys.facility fsys.severity h.host fsys.src_ip
fsys.src_time fsys.content fsys.tag
- > from fs_syslog fsys hostI 've added both indexes but don 't see an improvement in speed. Below are
the the descriptions of each table and the explain plan
CREATE TABLE `hosts` (
`hostid` bigint(20) unsigned NOT NULL deHi Christian
Christian High wrote
> I have a table that includes a date and a scale reading like
>
> date scale_reading
> 2007-08-01 150
> 2007-08-02 125
>
>
>
> these revery true to have unique constraint on both columns he needs to create a
composite index using both columns.
regards
anandkl
On 8/14/07 Martijn Tonies <m.tonies@(protected) > wrote
>
>
>
>
> >Of
>Of course since James said he will never search for a record matching
receiver_ID AND sender_ID it would be more efficient >to simply create one
index for each of the columns.
Then again his qWhat exactly will you be doing with this deployment? Is it for all
workstations servers just servers -- what?
What will be the daily functions of the PCs (what applications/daemons will
be used)?
Of course since James said he will never search for a record matching receiver_ID AND sender_ID it would be more efficient to simply create one index for each of the columns.
-Noah
-----Original On 8/14/07 Baron Schwartz <baron@(protected) > wrote
> Hi
>
> Christian High wrote
> > On 8/14/07 Baron Schwartz <baron@(protected) > wrote
> > > Hi
> > >
> > > Christian High wrote
> > > > I have a tablHi
Christian High wrote
> On 8/14/07 Baron Schwartz <baron@(protected) > wrote
> > Hi
> >
> > Christian High wrote
> > > I have a table that includes a date and a scale reading like
> > >
> > > date  |
|
 |