Comments (3)
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.
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.
Here's a patch that creates 3 views:
- My self-inflicted events
- Other-inflicted events
- Public events
Grab any indexes that you like...
from schemaverse.
Related Issues (20)
- Some performancey things HOT 4
- Per-ship policy HOT 4
- Suggest change to ships_near_ships HOT 1
- Log running of scripts in the event log
- Suggestion: Add in a regression test of some sort HOT 3
- my_ships view inducing Seq Scans on underlying tables HOT 1
- Serious bug in upgrade() HOT 2
- Performance tuning of in_range_planet() HOT 4
- Recommend having ships_near_ships managed purely in tic HOT 4
- Setting action/action_target_id not working with new ship insert.
- Can't create new ships HOT 2
- ship_course_control pushes my ship past it's max speed. HOT 2
- Accepts null PW, apparently no way to change PW HOT 5
- Owner user is a bit over-capable HOT 1
- Can't open a single link on the site HOT 3
- cannot register HOT 5
- Is the Schemaverse public server still operational? HOT 3
- Proposal to Restrict Table Creation Permissions
- Schemaverse.com site is cannot be reach
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schemaverse.