Git Product home page Git Product logo

Comments (3)

Abstrct avatar Abstrct commented on August 16, 2024

I am definitely down with implementing anything that will make events useful. I have been a bit distant the last week or so but I have some time lined up this week to work on the game. I will work on adding this, the fleet script execution time/error events, and what you mentioned to help speed up my_ships (adding player_id to ship_control w\ and index).

from schemaverse.

cbbrowne avatar cbbrowne commented on August 16, 2024

Public DB's down at the moment, so I can't offer up samples/query plans, but it looks likely to me that the use of CTEs for the event view may have been a little bit too clever.

I was trying to query for how long fleet scripts have been running, lately, hence
select * from my_events where action = 'FLEET_SUCCESS' where tic > (select last_value from tic_seq) - 50;

In principle, both the tic restriction and the action restriction ought to offer excellent opportunity to restrict things to the last 50 fleet script entries.

Unfortunately, it doesn't seem that the filters on action or tic are getting pushed down into the 3 UNION ALL portions of the query, so this reverted into a trio of Seq Scans on event, and winds up timing out.

As cool as CTE is, it seems to me that you may want to turn it back into a simpler trio of UNION ALL subqueries; I think that'll be able to take advantage of the indexes rather more readily.

from schemaverse.

cbbrowne avatar cbbrowne commented on August 16, 2024

Here's a patch that creates 3 views:

  1. My self-inflicted events
  2. Other-inflicted events
  3. Public events

cbbrowne@c027eeb

Grab any indexes that you like...

from schemaverse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.