RoundSparrow

“Finnegans Wake is the greatest guidebook to media study ever fashioned by man.” - Marshall McLuhan, Newsweek Magazine, page 56, February 28, 1966.

I have never done LSD or any other illegal drugs, but I have read FInnegans Wake: www.LazyWake.com

Lemmy tester, “RocketDerp” is my username on GitHub

  • 4 Posts
  • 31 Comments
Joined 1 year ago
cake
Cake day: June 2nd, 2023

help-circle
  • This basically shuts my idea down

    it’s not very difficult to modify the code for something like this… and closing off registration wont’ let anyone else login and create new content form your istance.

    Personally the load on the major servers by having one more instance that subscribes to everything is why I think people should back off from creating more than the 1500 instances Lemmy network already has. Delivery of every single vote, comment, post 24 hours a day just so one person can read content for an hour or two a day.

    That makes sense for email systems where all that content doesn’t have to be sent, but for Lemmy it’s a huge amount of overhead.


  • Personally I think the issue is more that there is blind loyalty to team sports in USA culture, and no matter how many bad things are documented about a specific person (Donald Trump, Richard Nixon)… people are loyal to the image of that person, the brand and logo. People are raised in the USA to be inundated with breakfast cereal and toy company logo/brand recognition. It’s a faith system. Breakfast cereals and fast-food “Happy plates” that fund a lot of children’s TV are incredibly unhealthy and profit machines - and parents think this is psychologically healthy.

    Politics will eventually be replaced by imagery. The politician will be only too happy to abdicate in favor of his image, because the image will be much more powerful than he could ever be. -Marshall McLuhan





  • Good results with this approach. I hadn’t considered the RANK OVER PARTITION BY criteria_a values and it works like a champ. It moves the ORDER BY into the realm of focus (criteria_a) and performance seems decent enough… and it isn’t difficult to read the short statement.

    SELECT COUNT(ranked_recency.*) AS post_row_count
    FROM
      (
         SELECT id, post_id, community_id, published,
            rank() OVER (
               PARTITION BY community_id
               ORDER BY published DESC, id DESC
               )
         FROM post_aggregates) ranked_recency
    WHERE rank <= 1000
    ;
    

    Gives me the expected results over the 5+ million test rows I ran it against.

    If you could elaborate on your idea of TOP, please do. I’m hoping there might be a way to wall the LIMIT 1000 into the inner query and not have the outer query need to WHERE filter rank on so many results?












  • given it traverses all the comment X comment space every time a comment is added.

    The second query I shared is only referenced for maintenance rebuild. The routine update of count does target only the tree that the reply is to:

     select c.id, c.path, count(c2.id) as child_count from comment c
     join comment c2 on c2.path <@ c.path and c2.path != c.path
     and c.path  <@ '0.1'
    group by c.id
    

    I found a particularly complex tree with 300 comments. In production database (with generated test data added for this particular comment tree), it is taking .371 seconds every time a new comment is added, here is the result of the SELECT pulled out without the UPDATE:

    Obviously with the UPDATE it will take longer than .371 seconds to execute.