Get node ID for all results for current view including its filters, disregarding the pager
I ran into this problem on a recent project.  I decided against a EntityFieldQuery or db_query()/db_select() solution for four reasons.


Views can do some really weird things when it builds a query.  For example, in some instances when you add a sort, the sort key will be added to the returned field list.  This can alter what gets returned when you enable aggregation, reduce duplicates, etc.
Views tends to use LEFT JOIN instead of INNER JOIN.  You can do this with db_query() and db_select(), but not EntityFieldQuery.
SQL can be unpredictable with the undefined ordering between having a LIMIT or not.  For example, if you are sorting by titles and have duplicates, I have seen different results orders.  This mans you may need to be really explicit with sorts, if order is important (I was implementing prev/next through a result set, so it was).
I really don't like implementing things in code when I know a non-coder may want to adjust the View.


So, I ended up using this:

$all = views_get_view('my_view');

$all-&gt;display['default']-&gt;display_options['pager'] = array(
  'type' =&gt; 'none',
  'options' =&gt; array(
    'offset' =&gt; 0,
  ),
);

$all-&gt;set_display('my_display');

$all-&gt;display[$all-&gt;current_display]-&gt;display_options['pager'] = array(
  'type' =&gt; 'none',
  'options' =&gt; array(
    'offset' =&gt; 0,
  ),
);

$all-&gt;pre_execute();
$all-&gt;execute();

$nids = array();

foreach ($all-&gt;result as $result) {
  $nids[] = (int) $result-&gt;nid;
}


This will


Manually instantiate the view.
Reset the pager on the master to show all results starting from 0.
Set the display to whatever I am using.
Reset that pager, too.
Execute the view
Loop through the results for what I need.