Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Shaun Campbell, on IDS 7.30 under Windows NT4, found that joining three sysmaster tables (syssessions, syssqlstats, syssesprof) on session id returned no rows, although any two joined fine. Lyzander Marantal saw the same on 7.24 UC7 and cited bug 82434. Art S. Kagel noted syssessions and syssesprof are views on sysrstcb, the latter using SUM and GROUP BY, and suggested a cursor loop in 4GL, ESQL/C or a stored procedure. No confirmed fix.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Shaun Campbell — — source: Informix-list mailing list archive (1991-1998)
I am trying to write an SQL query on the sysmaster database to identify
what sessions there are and how many locks each has.
When I join say the syssessions table with syssqlstats via the session id
all is fine. When I introduce a third table say syssesprof joining by
the session I don't get any records retrieved even though when I query
all three tables separately there is equivalent data in all three tables.
Joining any two of the three tables retrieves data but not when I
introduce a third.
Does anyone know why this is or has anyone else come across the problem?
BTW I a running IDS 7.30 on Windows NT4.
Thanks
Shaun Campbell
↪ replying to Shaun Campbell
Lyzander Marantal — — source: Informix-list mailing list archive (1991-1998)
I have also encountered this bug on 7.24 UC7
Ask Informix about Bug # 82434
Lyzander
In article <3725483F.1392@emltd.co.uk>,
Shaun Campbell <shaun@emltd.co.uk> wrote:
> I am trying to write an SQL query on the sysmaster database to identify
> what sessions there are and how many locks each has.
>
> When I join say the syssessions table with syssqlstats via the session id
> all is fine. When I introduce a third table say syssesprof joining by
> the session I don't get any records retrieved even though when I query
> all three tables separately there is equivalent data in all three tables.
> Joining any two of the three tables retrieves data but not when I
> introduce a third.
>
> Does anyone know why this is or has anyone else come across the problem?
> BTW I a running IDS 7.30 on Windows NT4.
>
> Thanks
>
> Shaun Campbell
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
↪ replying to Shaun Campbell
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Shaun Campbell wrote:
>
> I am trying to write an SQL query on the sysmaster database to identify
> what sessions there are and how many locks each has.
>
> When I join say the syssessions table with syssqlstats via the session id
> all is fine. When I introduce a third table say syssesprof joining by
> the session I don't get any records retrieved even though when I query
> all three tables separately there is equivalent data in all three tables.
> Joining any two of the three tables retrieves data but not when I
> introduce a third.
>
> Does anyone know why this is or has anyone else come across the problem?
> BTW I a running IDS 7.30 on Windows NT4.
One thing you might look into is the fact that both syssessions and
syssesprof are views into the sysrstcb table. If you look at the
definition of the latter all the 'columns' it returns after sid are
the result of the SUM() aggregate function and depend on a GROUP BY sid
clause. I cannot imagine how the engine could properly resolve that
with the query in syssessions which only selects the primary thread for
a session.
I'd suggest a 4GL or ESQL/C program to implement your report which
loops on syssessions records using a cursor and performs a query
against syssesprof for that session in the loop or two parallel cursors
and do your own nested loop join which will be more complex to code but
faster to run.
Art S. Kagel
↪ replying to Shaun Campbell
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Shaun Campbell wrote:
>
> I am trying to write an SQL query on the sysmaster database to identify
> what sessions there are and how many locks each has.
>
> When I join say the syssessions table with syssqlstats via the session id
> all is fine. When I introduce a third table say syssesprof joining by
> the session I don't get any records retrieved even though when I query
> all three tables separately there is equivalent data in all three tables.
> Joining any two of the three tables retrieves data but not when I
> introduce a third.
Addendum to my post:
I suppose a stored procedure to implement the nested loop or loop and
query would not be difficult either! I just tend to think of ESQL/C
and 4GL first.
Art S. Kagel
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.