Map progress with stars per lesson. How to store/request stats sql

The massive SQL request for the map is for loading the progress, not for the image. I store for every lesson result (1-3 stars). Lets say the player completed all (10) lessons of a map. To show the map with its stars, I would have to request point the highest score for each map. Not sure now if this can be done in only one SQL call. Have to check this.
Another way of doing it is storing all needed data (number of stars for each map point) in a JSON encoded string to the database. So it’s just one request. But useless for statistics, so it’s still necessary to write each lesson to “results”.
Shouldn't I just keep those stats locally so I don't have to request them from the server every time?

Well, been reading and mysql can handle billions of rows. So I think I read that there is some slow down in the chain
AIR - browser(php) - mysql - broswer - AIR
I know mysql processes damn fast so somewhere in that chain things are getting slowed down. I read somewhere that stored procedures in the mysql db help as they are already compiled and you can also execute various commands with one sql call. Also, helps against sql injection.
Is that right??? and where might the "slow down" come from?

Similar Messages

  • Help with unsigned ints and how to store and retrieve data in them

    Hi all
    I have a problem where some data is being stored in an unsigned int
    i dont really know much about them and am unsure on how to go about using the data.
    The data being stored in them is row and column information in an excel spreadsheet.
    The method is passed through 2 ints (column, row) and then a unsigned int is created out of these two values
    the column is 8 bits and shift to the left hand byte (column & 0xFF <<24)
    the row is 16 bits shifted to the right of the column (row & 0XFFFF <<8)
    so if the column and row were 1,1 then the unsigned int would be
    16777472
    and for 1,2 then it would be 16777728
    (i dont actually know how these numbers are formed, it would be great if someone can explain this too :) )
    anyway now i have those unsigned int numbers does anyone know how i would go about taking that unsigned int and getting my int back from it
    so take 16777728 and extracting column 1, row 2
    any help would be appreciated

    its not a 3rd party product, its been written by
    another peep who is on holiday for 2 weeks so im
    trying to sort something out but dont really
    understand unsigned ints and stuff :(This is what is called a "third party product". It's not written by Sun, and it's not written by you.

  • How to store movies & TV shows in a different location

    Hi there!
    I've seen many of you asking (unfortunatelly with no clear answer) how to store movies & TV shows into another location away from the iTunes Music folder. This idea is to store videos on an AirDisk drive and keep music on the MacBook for example!
    I've been trying to do so in the past few days but some pb have occured...
    - it is possible to replace the Movies folder by an alias pointing to a Movies folder in the AirDisk drive: existing movies will be playable in iTunes.... the problem is that when I try to add new movies iTunes do not store them into the Movies folder on the AirDisk but in the local music folder (very strange as it is a video file!).
    Has anyone succeeded in using such mechanisms?!
    Many thanks for your answers!
    Guillaume,

    kazbe81 wrote:
    I've got a couple of movies and tv shows that I've deleted from my purchase list on itunes as well as my download file on my computer but they are still on my itunes in the cloud does anyone know how I can delete these?
    You cannot delete them from iCloud.
    They are purchased and will always be available in iTunes in iCloud for you to download again if you wish.

  • How to store grid points in a file using Java Swing?

    Please someone help me with any suggestions about how to store the grid points in a file using Java Swing

    Actually i have designed a gridlayout in Java Swing and have added some components to it such as buttons or images....My problem is when I click on any of the cell of the grid,the corresponding cell number should be stored in an external file....Do u have any suggestions on how to do it?

  • How do I request a transcript of a Verizon Customer Service phone conversation that I asked to be reviewed?

    On 2/11 I had a recorded phone conversation with a Verizon Supervisor.  We had a dispute about what was offered and I asked that the tapes be reviewed to settle the dispute.  I was told the tapes would be reviewed and I would receive a text with the results.  As of now, I have received no return text with the results.  How do I request a transcript of our conversation. 

    First of all, Verizon only states your conversation MAY be recorded, not that it WILL be recorded.
    It also states they are for "training purposes", not for providing transcripts to Verizon customers.
    I doubt you will be able to get either a copy of the recording, if there is one, or a transcript.

  • I'm new to Photoshop Elements and just getting started.  While in the organizer I have one group of photos up to learn with and now it says Edit in Progress with a padlock icon.  How can I remove this so that the photos will be restored to normal?

    I'm new to Photoshop Elements and just getting started.  While in the organizer I have one group of photos up to learn with and now it says Edit in Progress with a padlock icon.  How can I remove this so that the photos will be restored to normal?

    Go back to the editor and close the photo there.

  • I bought the 9.99 per month subscription to LR Mobile.  There was a special running that included Photoshop with this subscription.  How do I download and register Photoshop?

    I bought the 9.99 per month subscription to LR Mobile.  There was a special running that included Photoshop with this subscription.  How do I download and register Photoshop?

    If you have the PS+LR bundle, then you should install the Creative Cloud app, first.   One CC is installed, it’ll show all your eligible products on its Apps list, with Install buttons next to the apps you’re licensed to use, and Trial or Try next to the apps you’re not licensed to use.
    The CC app is the first thing on the Adobe Products page.  It is a desktop app, not tablet app. 
    https://www.adobe.com/downloads.html

  • HT1386 Error message says only one library per device. My previous computer crashed and now I want to sync with new computer. How do I overcome the error message?

    Error message says only one library per device. My previous computer crashed and now I want to sync with new computer. How do I overcome the error message?

    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • Hello, I have an ipad mini and I have made ​​a backup with iCloud, I deleted a game and now I would like to get my game progress, Can you recover? How?

    Hello, I have an ipad mini and I have made ​​a backup with iCloud, I deleted a game and now I would like to get my game progress, Can you recover? How?

    You would have to restore your entire backup to recover your game progress.

  • Multi tenancy with schema per tenant

    Hello,
    I am tryign to run multi tenancy with schema per tenant. It seems to work good when tenant ID is set in XML as a property for persistance unit.
    But I need to set tenant in code. Is that possible? How?
    I found this article:
    codecrafters.blogspot.it/2013/03/multi-tenant-cloud-applications-with.html
    So I tried to set it in doBegin method in custom transaction manager. But that doesn't work. I guess relation descriptors aren't updated right.
    I could provide more info with exception stack also but first... have I pick the right approach?
    Thanks!
    Martin

    UPDATE 26.6.2015: This isn't completelly right solution. Read also comments below or go to my article at http://www.mafospace.com/articles/multi-tenancy-with-eclipselink-and-inherited-entities
    I've solved it finally. Maybe it will be helpful for someone. I've done that in similar way as described in article I linked in first post. Through custom transaction manager.
    import org.eclipse.persistence.config.PersistenceUnitProperties;
    import org.eclipse.persistence.internal.jpa.EntityManagerImpl;
    import org.eclipse.persistence.sessions.coordination.MetadataRefreshListener;
    import org.eclipse.persistence.sessions.server.ServerSession;
    import org.springframework.orm.jpa.JpaTransactionManager;
    import sk.bantip.hotel.server.security.SecurityHelper;
    import javax.persistence.EntityManager;
    import java.util.HashMap;
    import java.util.Map;
    public class MultiTenantJpaTransactionManager extends JpaTransactionManager {
    * NOTE:
    * Maybe it would be also possible to replace existing entityManager in transaction with new but it
    * isn't a good idea because of rollback and other problems.
    * So when new tenant is required always start new transaction for it.
    @Override
    protected javax.persistence.EntityManager createEntityManagerForTransaction() {
    EntityManager em = super.createEntityManagerForTransaction();
    boolean refreshed = false;
    String actualTenant = null;
    ServerSession ss = ((EntityManagerImpl) em.getDelegate()).getServerSession();
    Map sessionProp = ss.getProperties();
    actualTenant = (String) sessionProp.get(PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT);
    // don't run it if tenant didn't change
    // it should be quite faster then
    if ((actualTenant == null && SecurityHelper.getActiveTenantSchema() != null) ||
    (actualTenant != null && !actualTenant.equals(SecurityHelper.getActiveTenantSchema()))) {
    // set new tenant as property for actual session
    // while refreshing metadata it will be used from actual session for new session
    sessionProp.put(PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT, SecurityHelper.getActiveTenantSchema());
    MetadataRefreshListener mrl = ((EntityManagerImpl) em.getDelegate()).getServerSession().getRefreshMetadataListener();
    // metadata refresh listener is empty if it was already run for actual transaction (same entity manager)
    // because it is placed in createEntityManagerForTransaction now this shouldn't happen but to be sure...
    if (mrl != null) {
    Map<String, Object> prop = new HashMap<String, Object>();
    // metadata will be refreshed for next created entity manager
    mrl.triggerMetadataRefresh(prop);
    refreshed = true;
    // if metadata for "old" entity manager wasn't refreshed we don't need to create a new one
    return refreshed ? super.createEntityManagerForTransaction() : em;
    Everything seems to work except inheritance with strategy type JOINED now. To fix that use customizer.
    import org.eclipse.persistence.annotations.TenantTableDiscriminatorType;
    import org.eclipse.persistence.config.DescriptorCustomizer;
    import org.eclipse.persistence.descriptors.ClassDescriptor;
    import org.eclipse.persistence.descriptors.TablePerMultitenantPolicy;
    * For some reason when using table per tenant with schema discriminator isn't set good for child
    * entities with inheritance JOINED strategy. It stay as SUFFIX and therefore it doesn't work.
    public class InheritanceJoinedMTFixCustomizer implements DescriptorCustomizer {
    @Override
    public void customize(ClassDescriptor descriptor) throws Exception {
    // set discriminator to SCHEMA
    ((TablePerMultitenantPolicy) descriptor.getMultitenantPolicy())
    .setTenantTableDiscriminatorType(TenantTableDiscriminatorType.SCHEMA);
    And in child entities use it like this:
    @Customizer(InheritanceJoinedMTFixCustomizer.class)
    public class Person extends Contact {

  • WP8 Map control with custom tiles

    I'm trying to display a map control in my app targeting Windows Phone 8 but I want to use custom tiles from open street map.
    I'm using this line :
    mapControl.TileSources.Add(new TileSource("http://a.tile.openstreetmap.org/{zoomLevel}/{x}/{y}.png"));
    When I launch the app the custom tiles are properly displayed, but there's still the default map tiles underneath them.
    I tried to hide them, but I counld'nt even find where they exist in the map control and what is displaying them exactly.
    I would like to know how I can remove those default tiles when loading custom tiles.
    I tried to hide them, but I counld'nt even find where they exist in the map control and what is displaying them exactly.

    Hi MakanWG,
    You have solved your question in here:
    http://stackoverflow.com/questions/27948331/wp8-map-control-with-custom-tiles .
    Good!
    Vote if help you

  • Is there a way to track "pages viewed" progress with PDF's?

    Is there a way to track "pages viewed" progress with PDF's?
    Example: Student downloads a PDF from school portal -- Teacher can track who downloaded PDF, when and how many pages were view (where student stopped)? Similar to Flexpaper?

    The only other way I can come up with at the moment is by submitting the data via a URL to your server... The user will still have to allow the URL to be opened, though.

  • Mapping problem with compressed key update record (target format)...

    Hi Guys,
    Getting below error while replication from Source to target. Source table is having NOT NULL Column, but on target replicat process giving error about some NULL value ??
    How to overcome this issue, any idea...
    2011-08-04 10:35:04 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK starting.
    2011-08-04 10:35:05 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK started.
    2011-08-04 10:35:06 WARNING OGG-00869 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: OCI Error ORA-01407: cannot update ("INFRA"."CUST"."CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE" = :a4,"ORD_QTY" = :a5,"ORD_PRICE" = :a6,"CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.
    2011-08-04 10:35:06 WARNING OGG-01004 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Aborted grouped transaction on 'INFRA.CUST', Database error 1407 (ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL).
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 *WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: SQL error 1407 mapping INFRA.CUST to INFRA.CUST OCI Error ORA-01407:* *cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE"=:a4,"ORD_QTY"*
    *= :a5,"ORD_PRICE" = :a6,"SCRP_CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.*
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 ERROR OGG-01296 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Error mapping from INFRA.CUST to INFRA.CUST.
    2011-08-04 10:35:06 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: PROCESS ABENDING.
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    *Mapping problem with compressed key update record (target format)...*
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-
    04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    Mapping problem with compressed key update record (target format)...
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Any inputs / help would be appreciated.
    Regards,
    Manish

    The SCRP_CODE column has a NOT NULL constraint. The ORA-01407 error is telling you that you cannot update or set a value for this column to null because of the constraint. This has absolutely nothing to do with an index. You can use a marker/sentinel value in lieu of using NULL. For a numeric field, where everything is positive, a negative value (-1) can be decoded as meaning null. For a character field, a code such as NA can represent NULL.
    This also has nothing to do (directly) with GoldenGate failing because of this error. The underlying SQL statement will fail everywhere, regardless of the tool or application. It is not a case of failing only in GoldenGate.

  • I sometimes get "ghost" rating stars against tracks. how can i delete these?

    sometimes get "ghost" rating stars against tracks. how can i delete these?

    The iphone//ipad/ipod is not a backup/storage device.  The sync is one way - computer to iphone.  The exception is itunes purchases.
    There is no free, or Apple supported,  way to extract any other music.
    It has always been very basic to always maintain a backup copy of your computer.  Use your backup copy of your computer to put everything back.
    Iphone sync with one computer at a time.  Syncing to another will erase the current content from the iphone and replace with the content of the new computer.

  • Java-wsdl-mapping file with incorrect case

    Hi. We're working with JDeveloper 10.1.3.1 preview and have encountered what I believe to be a bug. We have a schema with element names that are mixed case (such as FirstName). We are trying to use JAXB to create our classes and then wrap it as a web service. The problem is, the WSDL and java-wsdl-mapping file references the element names as firstName rather than FirstName.
    In experimenting, I've learned that if I create the WSDL and schema first and "Create Java Project from WSDL" that it creates a java-wsdl-mapping file with the case preserved. However the first time I go into the web services properties dialog and click OK, it re-creates these files with the case changed again.
    Please advise if this is expected behavior...although I don't see how it could be since it is inconsistent.
    Thanks very much,
    Richard Davis

    I was told the product manager and/or developers from Oracle watched this board. Doesn't anyone have a response to this?

Maybe you are looking for

  • Percentage calculation problem in ALV Grid

    Hello All, I have a requirement like this : I have three columns in the grid named as A, B and C. In column A i have the values as 30 and 40. Here the subtotal is 70 through the fieldcatalog field DO_SUM = 'X' In column B i have the values as 50 and

  • Unique issue:installing windows via bootcamp

    Hi I tried googling for my issue and it looks like I am the only one facing this problem hence I suspect that I am missing or doing something wrong. Before I describe a background: I am running late 2006 macbook pro with core 2 duo. It is running Sno

  • Error when posting to Web Gallery

    I am getting an error that says "request to the server failed" whn attempting to use the web gallery option? Message was edited by: tropaz

  • I can not open iphoto and itune anymore

    anyone knows why i can not open iphoto and itune anymore/

  • Hi pls clarify

    hi,           any body pls tell me what is the it1004-character,it1006-restrictions,it1009-health examinations,it1010-resources and it1014-obselete in organization management.