It depends where the filter is created. If the initial connection is set to bring in all the data, the entire db will be returned in the query. A filter on the workbook will then filter on top of that data. If there is a database filter, that will limit the data coming in, and likewise a workbook filter will filter on the data already being brought in.
I hope that helps,