Percona toolkit in windows and some "Use of uninitialized value" errors with --group-by clause

916 views
Skip to first unread message

Fernando Ortega

unread,
Apr 18, 2012, 10:29:32 AM4/18/12
to Percona Discussion
Hi,

I'm trying to use Percona Toolkit (pt-query-digest) in Windows XP.

I've download a portable version of perl (5.10) and work.

But I've problems using group-by clause ({user} or {fingerprint} or
whatelse is not working, it says: "Use of uninitialized value"

Also with --type genlog I can't use {user} (for example). If I take
out --filter "$event->{user} ...." it works well.

So, until now, with --group-by or --type genlog, I can't use "$event"
for doing --filter

Does anybody know if I can't do this in windows ?
Does anybody do in windows ?

Thanks a lot.

Baron Schwartz

unread,
Apr 24, 2012, 11:10:03 AM4/24/12
to percona-d...@googlegroups.com
Fernando,

I don't know what might be wrong here. I don't know of any Windows-specific bugs. I would suggest using PTDEBUG=1 pt-query-digest <options> to try to see more about what is happening.

Regards,
Baron

> --
> You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
> To post to this group, send email to percona-d...@googlegroups.com.
> To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/percona-discussion?hl=en.
>

--
Chief Performance Architect at Percona <http://www.percona.com/>
+1 (888) 401-3401 x507
Calendar: <https://tungle.me/percona_baron>
Percona Live New York, Oct 1-2 <http://www.percona.com/live>

Message has been deleted
Message has been deleted

Fernando Ortega

unread,
Apr 26, 2012, 11:26:29 AM4/26/12
to Percona Discussion
Hi Baron,

Fisrt of all, thanks a lot for your time.

I'll try to define what I'm doing. These days I've installed a Ubuntu
VM with VirtualBox and do some check in it, with percona toolkit
correctly and full installed

I have Mysql 5.5.22 GA (windows machine), and I've done some test with
a slow log with only one query. (I read an article from Jonathan
Levin: http://www.jonathanlevin.co.uk/2012/04/mastering-mysql-indexing.html)

Then, in Ubuntu with percona-toolkit installed, the next commands work
perfectly:

1. pt-query-digest slow_short.log
2. pt-query-digest slow_short.log --filter '($event->{user} =~ m/
vostro230/)'
3. pt-query-digest pcclonico-slow.log --filter '($event-
>{fingerprint} =~ m/^(select)/)'

But the next two, doesn't work:

4. pt-query-digest slow_short.log --filter '($event->{Rows_read} >
1000)'
5. pt-query-digest pcclonico-slow.log --filter '($event-
>{fingerprint} =~ m/^(select)/)' --group-by tables

Why can I executte command 3 but not 5 ? The change is only about --
group-by clause (neither 'tables')

Both of them say that: "Pipeline process 10 (filter) caused an error:
Use of uninitialized value in pattern match (m//) at (eval 21) line 1,
<> line 1."

So my problem is about eventattributes.

I've read all about Maatkit Wiki, but I don't understand it well. I
can work only with USER, ROWS_EXAMINED, and ROWS_SENT,etc (these are
in my Mysql5.5.22GA(windows version) slow query log.

So If anyone could explain me how to use FINGERPRINT in --group-by
tables ? (may be is something about having percona server ?, or a
patch ? could I install that patch in my mysql windwos version
server ?)

Why can I execute command 3 but not 5 ? Why can I not use fingerprint
in --group-by clauses ?

Sorry for my poor knowledge but If you find easy to explain, I'd
appreciate you.

Bye,







On Apr 24, 5:10 pm, Baron Schwartz <ba...@percona.com> wrote:
> Fernando,
>
> I don't know what might be wrong here. I don't know of any Windows-specific bugs.  I would suggest using PTDEBUG=1 pt-query-digest <options> to try to see more about what is happening.
>
> Regards,
> Baron
>
> On Apr 18, 2012, at 10:29 AM, Fernando Ortega wrote:
>
>
>
>
>
> > Hi,
>
> > I'm trying to use Percona Toolkit (pt-query-digest) in Windows XP.
>
> > I've download a portable version of perl (5.10) and work.
>
> > But I've problems using group-by clause ({user} or {fingerprint} or
> > whatelse is not working, it says: "Use of uninitialized value"
>
> > Also with --type genlog I can't use {user} (for example). If I take
> > out --filter "$event->{user} ...." it works well.
>
> > So, until now, with --group-by or --type genlog, I can't use "$event"
> > for doing --filter
>
> > Does anybody know if I can't do this in windows ?
> > Does anybody do in windows ?
>
> > Thanks a lot.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
> > To post to this group, send email to percona-d...@googlegroups.com.
> > To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/percona-discussion?hl=en.
>
> --
> Chief Performance Architect at Percona <http://www.percona.com/>
> +1 (888) 401-3401 x507
> Calendar: <https://tungle.me/percona_baron>
> Percona Live New York, Oct 1-2 <http://www.percona.com/live>- Hide quoted text -
>
> - Show quoted text -

Baron Schwartz

unread,
Apr 27, 2012, 3:45:57 PM4/27/12
to percona-d...@googlegroups.com
Fernando,

On Apr 25, 2012, at 5:59 PM, Fernando Ortega wrote:

> So If anyone could explain me how to use DB, ROWS_READ, ROWS_AFFECTED,
> ARG, .... (may be is something about having percona server ?, or a
> patch ? could I install that patch in my mysql windwos version
> server ?)

What exactly is present in your log? You are using ALL-CAPS. Is that how it is written in the log?

Fernando Ortega

unread,
Apr 28, 2012, 6:01:52 PM4/28/12
to Percona Discussion
Excuse me for my writting, I am not using caps. I've used db,
Rows_read, and so on.

My slow-log is a normal Mysql 5.5 log.

Here you have an example of it:

# Time: 120425 13:47:40
# User@Host: vostro220[vostro220] @ [192.168.0.201]
# Query_time: 0.562500 Lock_time: 0.000000 Rows_sent: 15773
Rows_examined: 1340790
SET timestamp=1335354460;
SELECT p.idProducto, (....) FROM producto, (....) WHERE (....)

I've understood that I can only use Rows_sent or Rows_examined, buy
WHY I can't use --group-by tables option ? Does that option requerie
also a Mysql Percona server ?

As I say last week:
3. pt-query-digest pcclonico-slow.log --filter '($event-
>{fingerprint} =~ m/^(select)/)'
works perfectly, but
5. pt-query-digest pcclonico-slow.log --filter '($event-
>{fingerprint} =~ m/^(select)/)' --group-by tables
doesn't work.

The onyl difference is the group-by clause. I think that percona-
toolkit get the table name from sql clause, but why it doesn't work ?

Could you make any test ?

Thanks a lot.


Why can I executte command 3 but not 5 ? The change is only about --
group-by clause (neither 'tables')



Reply all
Reply to author
Forward
0 new messages