In Google Sheets, find most recent comment for a domain stackoverflow

Recent Questions - Web Applications Stack Exchange

Using this sheet - https://docs.google.com/spreadsheets/d/1SFXBBlgX6KoffGqQ3HHsRmFcDurGiUjFLYXT3igy8Nk/edit?usp=sharing

On the Demo sheet, please help me display the most Recent Comment from the Log sheet.

As you can see in the sheet, currently I am using =QUERY(Log!$A$2:F,"Select E Where B='" & A2 & "' ORDER BY A Desc LIMIT 1",-1) but in a sheet this size (5000+ domains and 5000+ comments), its very inefficient and takes too long to update, breaking other connected sheets. Is there a way to make it more efficient?

Sample data

LOG sheet

+---------------------+--------------------+--+--+---------------------+
| Timestamp           | Domain             |  |  | Comment             |
+---------------------+--------------------+--+--+---------------------+
| 01/12/2019 00:00:00 | random domain 1454 |  |  | random comment 1944 |
+---------------------+--------------------+--+--+---------------------+
| 01/12/2019 00:00:00 | random domain 3245 |  |  | random comment 476  |
+---------------------+--------------------+--+--+---------------------+
| 01/12/2019 00:00:00 | random domain 3653 |  |  | random comment 4837 |
+---------------------+--------------------+--+--+---------------------+
| 01/12/2019 00:00:00 | random domain 3907 |  |  | random comment 1761 |
+---------------------+--------------------+--+--+---------------------+
| 12/12/2019 00:00:00 | random domain 1043 |  |  | random comment 3703 |
+---------------------+--------------------+--+--+---------------------+
| 12/12/2019 00:00:00 | random domain 1891 |  |  | random comment 958  |
+---------------------+--------------------+--+--+---------------------+
| 12/12/2019 00:00:00 | random domain 2821 |  |  | random comment 1590 |
+---------------------+--------------------+--+--+---------------------+
| 12/12/2019 00:00:00 | random domain 3005 |  |  | random comment 962  |
+---------------------+--------------------+--+--+---------------------+
| 12/12/2019 0:00:00  | random domain 3282 |  |  | random comment 1188 |
+---------------------+--------------------+--+--+---------------------+

DEMO sheet

+-----------------+------+--------------+----------+--------+--------------+---------------------+
| Domain          | Slug | Date Applied | Provider | Status | Payment type | Recent Comment      |
+-----------------+------+--------------+----------+--------+--------------+---------------------+
| random domain 1 |      |              |          |        |              | random comment 2821 |
+-----------------+------+--------------+----------+--------+--------------+---------------------+
| random domain 2 |      |              |          |        |              | random comment 639  |
+-----------------+------+--------------+----------+--------+--------------+---------------------+
| random domain 3 |      |              |          |        |              | random comment 1849 |
+-----------------+------+--------------+----------+--------+--------------+---------------------+
| random domain 4 |      |              |          |        |              | random comment 2257 |
+-----------------+------+--------------+----------+--------+--------------+---------------------+


Recent Questions - Web Applications Stack Exchange Recent Questions - Web Applications Stack Exchange by tzonov via Recent Questions - Web Applications Stack Exchange

No comments:

Post a Comment