Question: On a php-server I capture all posted variables from $\_POST, forexample

```
var_dump($_POST);

```

This works fine if I use a html-form to post to the server.

I try to post to the server using nodejs and requestify:

```
requestify.post('http://localhost/rest/1/comment/create', {hello: 'world'})
.then(function(response) {
    console.log(response.getBody());
})

```

This will not be captured by the php-server and var\_dump($\_POST) outputs an empty array.

Answer: 
You could put an index on LogID in the table #tmpInvestorJob.

This should increase performance since it only count the rows that matches between the tables. It should be much faster because there are only a few rows in #TempTimeline.

```
UPDATE g 
SET 
  Completed =  COALESCE(a.Completed, 0)
FROM #TempTimeline g
-- using outer apply in case no matches are found to set completed to 0
OUTER APPLY 
(
  SELECT COUNT(*) Completed
  FROM #tmpInvestorJob
  WHERE
    [Status] = 3              
    and LogID = g.LogID
) a

```
```
CREATE TABLE #tmpInvestorJob (
    LogID INT PRIMARY KEY,
    Completed INT
)

INSERT INTO #tmpInvestorJob
SELECT LogID, COUNT(1)
FROM ...
WHERE [Status] = 3
GROUP BY LogID

UPDATE g
SET Completed = ISNULL(a.Completed, 0)
FROM #TempTimeline g
LEFT JOIN #tmpInvestorJob a ON a.LogID = g.LogID
OPTION(RECOMPILE)

```