tsql segmentation fault

Post Reply
gary.gabriel
Posts: 8
Joined: Thu Mar 14, 2002 1:42 pm

tsql segmentation fault

Post by gary.gabriel »

I'm running the following query on a large table:

select max(story_id) from story where valid=0 group by cluster_id;

The field 'valid' is currently equal to 0 for all rows in the table, though it will not always be true. So for right now it does a group by on the whole table. The table has approximately 600,000 rows, and the rows are large - the story.tbl file is a little bit over 2G. When I run this query from inside tsql, it runs for a while, then exits with:

200 ginfo->indexonly 0 in the function groupbysetup2
000 tsql ABEND: signal 11
Segmentation Fault

As it's running, I can watch it in top and see how it's using up more and more memory, until it gets to about 1G before it segfaults. This is a Sun 420R with 4G of RAM, but there are other things running, so it can't really get more than 1G. I tried doing a 'set ramlimit=400000000;', and even a 'set ramrows=10000;', but it still grows to 1G and dies. Is there another way to limit its memory usage? Is ramlimit used for something else?

Also, as a side question, is there any way to see what the current values of the server properties are? Kind of like 'env' in shell.

TIA

-Gary
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

tsql segmentation fault

Post by John »

Do you have an index on cluster_id, which should help. Usually you would also be selecting cluster_id. If that doesn't help you can open a ticket, and supply the table and index definition statements that you have and we can check exactly what it is doing.

There is not currently a way to dump the current server properties.
John Turnbull
Thunderstone Software
gary.gabriel
Posts: 8
Joined: Thu Mar 14, 2002 1:42 pm

tsql segmentation fault

Post by gary.gabriel »

Yes, there is an index on cluster_id. After trying a few more things, I got the query to run by limiting the set even further with another condition:

select cluster_id,max(story_id) from story where valid=0 and cluster_id!=0 group by cluster_id;

thanks for your help.
Post Reply