Fields clause

Posted by byoung2735 on 31-Aug-2017 12:31

Has anyone seen any major performance benefits, or any negatives, to using the FIELDS clause in a query?

Running Progress 11.4.

Thanks.

Posted by Brian K. Maher on 31-Aug-2017 13:44

What the FIELDS phrase does is leave the unwanted fields empty in the field structure being sent back.  Consequently we can pack more records (full or partial) into one TCP transmission.

Posted by Rick Terrell on 31-Aug-2017 13:50

You are correct about it having to reassemble the record and that adds some overhead. It's biggest advantage is in dataservers to "foreign" databases where you may have large, fixed length fields. 

Rick Terrell 
Principle Consultant, Professional Services 
Progress

Sent from my iPhone

Posted by Brian K. Maher on 31-Aug-2017 13:34

And only when you aren’t going to fetch the records using FIND CURRENT , GET CURRENT, etc or in any way have to cause the client to go back to the database to retrieve the full record.  Basically, read only and that’s that.

Posted by James Palmer on 31-Aug-2017 13:31

By the way, the only negative I can think of is if you reference a field that's not in the FIELDS phrase, but there is a parameter you can set on the client that will reread the record if the field phrase is wrong.

Posted by James Palmer on 31-Aug-2017 13:27

Yes. But only in a client/server environment.

All Replies

Posted by James Palmer on 31-Aug-2017 13:27

Yes. But only in a client/server environment.

Posted by James Palmer on 31-Aug-2017 13:31

By the way, the only negative I can think of is if you reference a field that's not in the FIELDS phrase, but there is a parameter you can set on the client that will reread the record if the field phrase is wrong.

Posted by Brian K. Maher on 31-Aug-2017 13:34

And only when you aren’t going to fetch the records using FIND CURRENT , GET CURRENT, etc or in any way have to cause the client to go back to the database to retrieve the full record.  Basically, read only and that’s that.

Posted by byoung2735 on 31-Aug-2017 13:39

Thanks for the responses.

I assume a server process would need to break the record apart and send part of the record, which might add some overhead on the server side vs blindly passing on the whole record?

If that's the case, I was thinking it might only make sense if the record was fairly large and you saw a significant reduction in the size of the data being passed over the network.

Thanks.

Posted by Brian K. Maher on 31-Aug-2017 13:44

What the FIELDS phrase does is leave the unwanted fields empty in the field structure being sent back.  Consequently we can pack more records (full or partial) into one TCP transmission.

Posted by Rick Terrell on 31-Aug-2017 13:50

You are correct about it having to reassemble the record and that adds some overhead. It's biggest advantage is in dataservers to "foreign" databases where you may have large, fixed length fields. 

Rick Terrell 
Principle Consultant, Professional Services 
Progress

Sent from my iPhone

This thread is closed