mysql – Consulta SQL tarda mucho tiempo en laravel y en phpmyadmin muy poco

Tengo una consulta que involucra 6 tablas, en laravel tarda 26 segundos en mostrar el resultado y en phpmyadmin 0.0089 segundos.

Foto de phpmyadmin

Resultado en laravel

Este es el código en laravel:

use DB;    
$partidas = DB::select("SELECT A.Patente, A.Pedimento, A.SeccionAduanera, A.Fraccion, A.SecuenciaFraccion, A.ValorComercial, A.PrecioUnitario, A.CantidadUMComercial, A.UnidadMedidaComercial, A.CantidadUMTarifa, A.UnidadMedidaTarifa, A.MetodoValorizacion, A.PaisOrigenDestino, A.PaisCompradorVendedor,  
                                                B.ClavePermiso, B.NumeroPermiso, 
                                                C.ClaveCaso, C.IdentificadorCaso, C.ComplementoCaso, 
                                                D.ClaveContribucion, D.FormaPago, D.ImportePago, 
                                                E.TasaContribucion, E.TipoTasa, 
                                                F.Observaciones
                                        FROM `551` A
                                        INNER JOIN `553` B ON B.Fraccion = A.Fraccion
                                                AND (A.SecuenciaFraccion = B.SecuenciaFraccion)
                                                AND (A.auditoria_id = 4 AND B.auditoria_id = 4)
                                                AND (A.Patente = '3452' AND B.Patente = '3452')
                                                AND (A.Pedimento = '0000180' AND B.Pedimento = '0000180') 
                                                AND (A.SeccionAduanera = '430' AND B.SeccionAduanera = '430')
                                        INNER JOIN `554` C ON C.Fraccion = A.Fraccion 
                                                AND (A.SecuenciaFraccion = C.SecuenciaFraccion)
                                                AND (A.auditoria_id = 4 AND C.auditoria_id = 4)
                                                AND (A.Patente = '3452' AND C.Patente = '3452')
                                                AND (A.Pedimento = '0000180' AND C.Pedimento = '0000180') 
                                                AND (A.SeccionAduanera = '430' AND C.SeccionAduanera = '430')
                                        INNER JOIN `557` D ON D.Fraccion = A.Fraccion 
                                                AND (A.SecuenciaFraccion = D.SecuenciaFraccion)
                                                AND (A.auditoria_id = 4 AND D.auditoria_id = 4)
                                                AND (A.Patente = '3452' AND D.Patente = '3452')
                                                AND (A.Pedimento = '0000180' AND D.Pedimento = '0000180') 
                                                AND (A.SeccionAduanera = '430' AND D.SeccionAduanera = '430')
                                        INNER JOIN `556` E ON E.Fraccion = A.Fraccion 
                                                AND (A.SecuenciaFraccion = E.SecuenciaFraccion)
                                                AND (A.auditoria_id = 4 AND E.auditoria_id = 4)
                                                AND (A.Patente = '3452' AND E.Patente = '3452')
                                                AND (A.Pedimento = '0000180' AND E.Pedimento = '0000180') 
                                                AND (A.SeccionAduanera = '430' AND E.SeccionAduanera = '430')
                                        INNER JOIN `558` F ON F.Fraccion = A.Fraccion 
                                                AND (A.SecuenciaFraccion = F.SecuenciaFraccion)
                                                AND (A.auditoria_id = 4 AND F.auditoria_id = 4)
                                                AND (A.Patente = '3452' AND F.Patente = '3452')
                                                AND (A.Pedimento = '0000180' AND F.Pedimento = '0000180') 
                                                AND (A.SeccionAduanera = '430' AND F.SeccionAduanera = '430')
                                        ");
                dd($partidas);

Por el momento tengo los valores estáticos para hacer pruebas pero serán con variables.

¿Sabrán por qué tarda tanto? y/o si es mejor hacer la consulta de otra forma para obtener más rendimiento.

Gracias!!

phpmyadmin – Servidor xammp y seevidor gratuito

Estoy tratando de subir una app en php y mysql a un hosting gratuito , la app me cargo y me subio todo muy bien , si me logueo con un usiario y contraseña correcta se ve el programa perfectamente , si en el logueo coloco cualquier cosa me deja ingresar y salen errores pero tiene la misma funcionalidad, en xampp me funciona a la perfeccion, si coloca datos malos no me deja ingresar , pero wn el hosting qie trato de subirlo no me esta validando, como podria solucionar este problema?

falha no phpmyadmin: A session is active

Boa noite!

Sei que não é uma duvida diretamente relacionado a código e por isso peço perdão mas sinceramente não encontrei outro lugar onde poderia recorrer ajuda.

Instalei o phpmyadmin no meu ubuntu e consigo acessa-lo através do navegador na url localhost/phpmyadmin.

O problema é que parece que a configuração não está 100% correta pois durante toda a navegação no painel do phpmyadmin, eu fico recebendo essa mensagem:

inserir a descrição da imagem aqui

Já tentei algumas soluções como habilitar o session_path no php.ini, ceder permissão a pasta do session_path e alterar o dono do phpmyadmin para o user www-data. Porém, nada surtou efeito.

  • Versão do apache: Apache/2.4.29 (Ubuntu)
  • versão do PHP: 7.2.31-1+ubuntu18.04.1+deb.sury.org+1
  • Versão do cliente de base de dados: libmysql – mysqlnd 5.0.12-dev –
    20150407
  • Extensão de PHP: mysqli curl mbstring
  • Versão do phpmyadmin: 4.6.6deb5
  • Ubuntu subsystem no windows, versão 18.04.4 LTS

(apesar de estar usando o ubuntu através do WSL, subsystem do windows, todo o apache e php estão no ubuntu. Não estou usando nada do windows, como xampp).

databases – phpmyadmin error #1064 – error in SQL syntax

I am making a product database, and I am having problems saving the table. Also I am wondering why it is saying MariaDB, on my XAMPP I don’t even have the option for MariaDB. How can I get rid of this error?

This is the error I am getting

mysql – How to export query result in csv file from phpmyadmin

I am running a query on PHPMyAdmin. The consultation is fine. You are showing the correct result.

I want to export that result in a CSV file. It is not on the local server. It's on the web server

This is my query

SELECT notices.id, notices.gazette_notice_id, notices.notice_code, notices.company_number, notices.publication_date, companies.company_name, companies.registered_address_town, companies.registered_address_postcode, companies.sic_1, sic_codes.description, sic_codes.division, sic_codes.section, insolvency_practitioners.name as practionar_name, insolvency_practitioners.company as practitioner_company, insolvency_practitioners.address as prac_address, insolvency_practitioners.phone  FROM notices
LEFT JOIN companies ON notices.company_number = companies.company_number 
LEFT JOIN sic_codes ON companies.sic_1 = sic_codes.code
LEFT JOIN notice_insolvency_practitioners ON notices.id = notice_insolvency_practitioners.notice_id 
LEFT JOIN insolvency_practitioners ON notice_insolvency_practitioners.insolvency_practitioner_id = insolvency_practitioners.id
Where notices.publication_date >'2020-05-01' and notices.publication_date < '2020-05-31'

In the phpmyadmin window at the bottom of the results pane, I can see an export link. but if i click on export that only allows me to export the warning table, not the result.

enter the image description here

I don't want to create a frontend window for it. I just want to export the result in a CSV file from PHPMyAdmin

I have reviewed the questions here

https://stackoverflow.com/questions/6239956/generate-csv-based-on-mysql-query-from-phpmyadmin

and here

https://stackoverflow.com/questions/356578/how-to-output-mysql-query-results-in-csv-format?page=1&tab=votes#tab-top

But I am confused when understanding the answers. Because I am running this query on a remote web server and I want to download the file to the local machine. And I don't want to create any new table for that.

How to export the result in a csv file?

XAMPP localhost phpmyadmin takes too long to respond

I am using macOS Catalina 10.15 and xampp version 7.4.5. After the home page, the localhost phpmyadmin takes too long to respond. I cannot access the mysql database.

Update of training name in mysql PHPMYADMIN through API in my application

I am trying to update the training name in sql database through the break API. But it is not working. I can't find any solution for this. The name of the workout is inserted from another api but only the update doesn't work. I am giving my code below for the class and the training name api.

//UPDATE WORKOUT NAME Class

updateWorkoutName($workout_name);
        if ($result('error')==False){
            echo json_encode(array('error' => False,'workout'=>$result('workout'), 'msg' => 'Workout Is updated!'));
        }
        else echo json_encode(array('error' => TRUE, 'msg' => 'Unable to upadate workout!'));
}
?>

Below is the API to update the workout name using the workout name class function.

updateWorkoutName($workout_name);
        if ($result('error')==False){
            echo json_encode(array('error' => False,'workout'=>$result('workout'), 'msg' => 'Workout Is updated!'));
        }
        else echo json_encode(array('error' => TRUE, 'msg' => 'Unable to upadate workout!'));
}
?>

Unfortunate Delete root user in my PHPMyAdmin in amps

Unfortunate Delete root user in my PHPMyAdmin in amps.

See these images. I remove these two sections and lost all my data.

http://prntscr.com/rtnzxy

Please help me with recovering root user data, is it possible?

phpmyadmin – Trigger not working correctly SQL

I have created this trigger in PHPMYADMIN

BEGIN

IF((SELECT COUNT(*) FROM jugador_stats WHERE id_partido = new.id_partido AND jugador = new.jugador) > 0) THEN

DELETE FROM jugador_stats WHERE id_partido = new.id_partido AND jugador = new.jugador;

ELSE

INSERT INTO jugador_stats VALUES (new.id_partido, new.jugador, new.triples_metidos, new.tiros_2_metidos, new.tiros_libres_metidos, new.tapones, new.robos);

END IF;
END

The function it has is that in the table player_stats there is a compound key (match_id and player (is the username)). And if they are going to enter the data of a player of the game a second time, they will delete you the first time it was done and leave you with the second. Well the data is never INSERTED. If I delete the trigger if it leaves me, but of course, if I reinsert them there are repeated compound keys.

plugins – Store GravityForm data in phpmyadmin (mysql)

I am currently developing a small portal in WordPress for a client where users have to submit forms (created with Gravity Forms). I would like to be able to store the data from these forms, once submitted, in a custom database that I created in phpmyadmin. I have all the tables and structure configured, but I don't know how to feed the data.

I know I eventually have to use the hook & # 39; gform_after_submission & # 39 ;, but I don't know where to start.

Thank you!