Getting processlist info in a query
Getting processlist info in a query
am 04.05.2006 16:39:16 von Cirene
I have a need to get a list of currently connected users in a query for
use in a view. I know the syntax for show processlist, but as of yet I
cannot find a way of joining that information in a view. I also can't
find any accessible table that lists the currently logged in users. The
reason that show processlist isn't sufficient for my needs is that I
need to display this information in a vb.net application, which as is
currently designed uses one view. I would like to modify the view to
include a boolean value based on whether or not they show up in the
processlist. I don't care what process they are using, nor do I care
about the state of the connection. Thanks.
Re: Getting processlist info in a query
am 04.05.2006 17:10:30 von Thomas Bartkus
> "No bother" wrote in message
news:umo6g.42$Ux3.37@fe11.lga...
> I have a need to get a list of currently connected users in a query for
> use in a view. I know the syntax for show processlist, but as of yet I
> cannot find a way of joining that information in a view. I also can't
> find any accessible table that lists the currently logged in users. The
> reason that show processlist isn't sufficient for my needs is that I
> need to display this information in a vb.net application, which as is
> currently designed uses one view. I would like to modify the view to
> include a boolean value based on whether or not they show up in the
> processlist. I don't care what process they are using, nor do I care
> about the state of the connection. Thanks.
The way to build further queries upon (pseudo?) queries like "SHOW PROCESS
LIST" is to dump the results into a file and then load the file back into a
table you create. Once the data is in a table, all normal query operations
are available to you. You can then join away in whatever scheme suits you!
IOW - you need to create that "accessible table that lists the currently
logged in users" yourself.
Since the process list is always going to be reasonably short (one would
hope!), a temporary table would do quite nicely. But the details are up to
you.
A nuisance perhaps, but not difficult. I am glossing over details (ask
away!), but I don't know of a simpler way to handle these pseudo queries (as
I call them!).
I would love to hear anyone chime in here with alternate techniques!
Thomas Bartkus
Re: Getting processlist info in a query
am 04.05.2006 17:25:46 von Thomas Bartkus
> "No bother" wrote in message
news:umo6g.42$Ux3.37@fe11.lga...
> I have a need to get a list of currently connected users in a query for
> use in a view. I know the syntax for show processlist, but as of yet I
> cannot find a way of joining that information in a view. I also can't
> find any accessible table that lists the currently logged in users. The
> reason that show processlist isn't sufficient for my needs is that I
> need to display this information in a vb.net application, which as is
> currently designed uses one view. I would like to modify the view to
> include a boolean value based on whether or not they show up in the
> processlist. I don't care what process they are using, nor do I care
> about the state of the connection. Thanks.
The way to build further queries upon (pseudo?) queries like "SHOW PROCESS
LIST" is to dump the results into a file and then load the file back into a
table you create. Once the data is in a table, all normal query operations
are available to you. You can then join away in whatever scheme suits you!
IOW - you need to create that "accessible table that lists the currently
logged in users" yourself.
Since the process list is always going to be reasonably short (one would
hope!), a temporary table would do quite nicely. But the details are up to
you.
A nuisance perhaps, but not difficult. I am glossing over details (ask
away!), but I don't know of a simpler way to handle these pseudo queries (as
I call them!).
I would love to hear anyone chime in here with a less cumbersome technique!
Thomas Bartkus
Re: Getting processlist info in a query
am 04.05.2006 23:03:16 von Cirene
Thomas Bartkus wrote:
>> "No bother" wrote in message
> news:umo6g.42$Ux3.37@fe11.lga...
>> I have a need to get a list of currently connected users in a query for
>> use in a view. I know the syntax for show processlist, but as of yet I
>> cannot find a way of joining that information in a view. I also can't
>> find any accessible table that lists the currently logged in users. The
>> reason that show processlist isn't sufficient for my needs is that I
>> need to display this information in a vb.net application, which as is
>> currently designed uses one view. I would like to modify the view to
>> include a boolean value based on whether or not they show up in the
>> processlist. I don't care what process they are using, nor do I care
>> about the state of the connection. Thanks.
>
> The way to build further queries upon (pseudo?) queries like "SHOW PROCESS
> LIST" is to dump the results into a file and then load the file back into a
> table you create. Once the data is in a table, all normal query operations
> are available to you. You can then join away in whatever scheme suits you!
>
> IOW - you need to create that "accessible table that lists the currently
> logged in users" yourself.
> Since the process list is always going to be reasonably short (one would
> hope!), a temporary table would do quite nicely. But the details are up to
> you.
>
> A nuisance perhaps, but not difficult. I am glossing over details (ask
> away!), but I don't know of a simpler way to handle these pseudo queries (as
> I call them!).
>
> I would love to hear anyone chime in here with a less cumbersome technique!
> Thomas Bartkus
>
>
Thanks for the reply!
Is the information by any chance kept in a table hidden from normal view
yet addressable in a SQL statement?
Re: Getting processlist info in a query
am 04.05.2006 23:59:39 von Thomas Bartkus
"No bother" wrote in message
news:p_t6g.217$qF6.52@fe10.lga...
> Thomas Bartkus wrote:
> >> "No bother" wrote in message
> > news:umo6g.42$Ux3.37@fe11.lga...
> >> I have a need to get a list of currently connected users in a query for
> >> use in a view. I know the syntax for show processlist, but as of yet I
> >> cannot find a way of joining that information in a view. I also can't
> >> find any accessible table that lists the currently logged in users.
The
> >> reason that show processlist isn't sufficient for my needs is that I
> >> need to display this information in a vb.net application, which as is
> >> currently designed uses one view. I would like to modify the view to
> >> include a boolean value based on whether or not they show up in the
> >> processlist. I don't care what process they are using, nor do I care
> >> about the state of the connection. Thanks.
> >
> > The way to build further queries upon (pseudo?) queries like "SHOW
PROCESS
> > LIST" is to dump the results into a file and then load the file back
into a
> > table you create. Once the data is in a table, all normal query
operations
> > are available to you. You can then join away in whatever scheme suits
you!
> >
> > IOW - you need to create that "accessible table that lists the currently
> > logged in users" yourself.
> > Since the process list is always going to be reasonably short (one would
> > hope!), a temporary table would do quite nicely. But the details are up
to
> > you.
> >
> > A nuisance perhaps, but not difficult. I am glossing over details (ask
> > away!), but I don't know of a simpler way to handle these pseudo queries
(as
> > I call them!).
> >
> > I would love to hear anyone chime in here with a less cumbersome
technique!
> > Thomas Bartkus
> >
> >
>
> Thanks for the reply!
>
> Is the information by any chance kept in a table hidden from normal view
> yet addressable in a SQL statement?
Not to my knowledge! And I do find it somewhat mysterious that you can not
treat these like regular queries.
But where there's a will there's a way ;-)
Thomas Bartkus
Re: Getting processlist info in a query
am 05.05.2006 20:05:24 von Cirene
Thomas Bartkus wrote:
> "No bother" wrote in message
> news:p_t6g.217$qF6.52@fe10.lga...
>> Thomas Bartkus wrote:
>>>> "No bother" wrote in message
>>> news:umo6g.42$Ux3.37@fe11.lga...
>>>> I have a need to get a list of currently connected users in a query for
>>>> use in a view. I know the syntax for show processlist, but as of yet I
>>>> cannot find a way of joining that information in a view. I also can't
>>>> find any accessible table that lists the currently logged in users.
> The
>>>> reason that show processlist isn't sufficient for my needs is that I
>>>> need to display this information in a vb.net application, which as is
>>>> currently designed uses one view. I would like to modify the view to
>>>> include a boolean value based on whether or not they show up in the
>>>> processlist. I don't care what process they are using, nor do I care
>>>> about the state of the connection. Thanks.
>>> The way to build further queries upon (pseudo?) queries like "SHOW
> PROCESS
>>> LIST" is to dump the results into a file and then load the file back
> into a
>>> table you create. Once the data is in a table, all normal query
> operations
>>> are available to you. You can then join away in whatever scheme suits
> you!
>>> IOW - you need to create that "accessible table that lists the currently
>>> logged in users" yourself.
>>> Since the process list is always going to be reasonably short (one would
>>> hope!), a temporary table would do quite nicely. But the details are up
> to
>>> you.
>>>
>>> A nuisance perhaps, but not difficult. I am glossing over details (ask
>>> away!), but I don't know of a simpler way to handle these pseudo queries
> (as
>>> I call them!).
>>>
>>> I would love to hear anyone chime in here with a less cumbersome
> technique!
>>> Thomas Bartkus
>>>
>>>
>> Thanks for the reply!
>>
>> Is the information by any chance kept in a table hidden from normal view
>> yet addressable in a SQL statement?
>
> Not to my knowledge! And I do find it somewhat mysterious that you can not
> treat these like regular queries.
>
> But where there's a will there's a way ;-)
> Thomas Bartkus
>
>
Thank you for all your help. I have managed to get the information
mainly because of your help.
I cheated a bit in that I used MS Access to run a pass-through query,
which then feeds another query that lets me put the information into a
link table.
Re: Getting processlist info in a query
am 05.05.2006 22:54:39 von Thomas Bartkus
"No bother" wrote in message news:LtM6g.28$uM5.6@fe08.lga...
> Thomas Bartkus wrote:
> > "No bother" wrote in message
> > news:p_t6g.217$qF6.52@fe10.lga...
> >> Thomas Bartkus wrote:
> >>>> "No bother" wrote in message
> >>> news:umo6g.42$Ux3.37@fe11.lga...
> >>>> I have a need to get a list of currently connected users in a query
for
> >>>> use in a view. I know the syntax for show processlist, but as of yet
I
> >>>> cannot find a way of joining that information in a view. I also
can't
> >>>> find any accessible table that lists the currently logged in users.
> > The
> >>>> reason that show processlist isn't sufficient for my needs is that I
> >>>> need to display this information in a vb.net application, which as is
> >>>> currently designed uses one view. I would like to modify the view to
> >>>> include a boolean value based on whether or not they show up in the
> >>>> processlist. I don't care what process they are using, nor do I care
> >>>> about the state of the connection. Thanks.
> >>> The way to build further queries upon (pseudo?) queries like "SHOW
> > PROCESS
> >>> LIST" is to dump the results into a file and then load the file back
> > into a
> >>> table you create. Once the data is in a table, all normal query
> > operations
> >>> are available to you. You can then join away in whatever scheme suits
> > you!
> >>> IOW - you need to create that "accessible table that lists the
currently
> >>> logged in users" yourself.
> >>> Since the process list is always going to be reasonably short (one
would
> >>> hope!), a temporary table would do quite nicely. But the details are
up
> > to
> >>> you.
> >>>
> >>> A nuisance perhaps, but not difficult. I am glossing over details
(ask
> >>> away!), but I don't know of a simpler way to handle these pseudo
queries
> > (as
> >>> I call them!).
> >>>
> >>> I would love to hear anyone chime in here with a less cumbersome
> > technique!
> >>> Thomas Bartkus
> >>>
> >>>
> >> Thanks for the reply!
> >>
> >> Is the information by any chance kept in a table hidden from normal
view
> >> yet addressable in a SQL statement?
> >
> > Not to my knowledge! And I do find it somewhat mysterious that you can
not
> > treat these like regular queries.
> >
> > But where there's a will there's a way ;-)
> > Thomas Bartkus
> >
> >
>
> Thank you for all your help. I have managed to get the information
> mainly because of your help.
>
> I cheated a bit in that I used MS Access to run a pass-through query,
> which then feeds another query that lets me put the information into a
> link table.
That's not cheating at all ;-)
It's just intelligent usage of available tools.
Thomas Bartkus