You are here: Re: How to Find the Last Accessed Date of a MySql Database « PHP Programming Language « IT news, forums, messages
Re: How to Find the Last Accessed Date of a MySql Database

Posted by Jerry Stuckle on 02/01/08 12:36

C. (http://symcbean.blogspot.com/) wrote:
> On 1 Feb, 11:05, "mosesdinaka...@gmail.com" <mosesdinaka...@gmail.com>
> wrote:
>> Hi All,
>>
>> How to find out the last accessed date of a MySql Database.
>>
>> I have around 200 databases in my server some are used and some are
>> not in Use, I want to remove the database that are not in Use.
>>
>> SHOW TABLE STATUAS gives me last updated Date.
>>
>> In my case there are some database which are not updated at all, but
>> it is in use (ie only SELECT no UPDATE)
>>
>> So Is there a way to get the datetime of the last SELECT query that is
>> being execued in a Database.
>>
>> Thanks
>> Moses
>
> You could check the access time on the database file (assuming its
> sitting on a *nix/Linux box). But that might be changed by other
> things (particularly stopping/starting the database and of course
> backups).
>
> You *could* get the last query from the slow queries log by setting
> the threshold to 0 but IIRC this is for the whole DBMS and it'd be
> difficult to discriminate between tables with the same name in
> different databases.
>
> Otherwise I guess you'd have to reconcile the apache access log with
> the tables.
>
> C.
>

None of which will give you correct information.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация