Accéder au contenu principal

Perl odbc, et les merveilleux quasi-piège et monde cryptique et à prendre en note.

 Un quasi piège de penser à une connexion temporisé peut rimé avec vitesse d’exécution. Il faut opter pour une fluidité d'action. Tels Perl est conçu dans l'optique de favoriser un travail administratif et rapide, perl compte énormément pour des rapports d'informations et à base de régime de diffusion. Ce qui en ressort d'une activité de connexion et de conception unitaire à alimentation de une transaction à la fois, perl rapporte ceci:

Une statistique du code DpkgSearchDb en mode insertion à l'unité, vitesse pour 3074 paquets

Type de connexion, temporisé.
  


my $DbHandler = DBI->connect_cached( $DbDsn, $userid, $password, { RaiseError => 1} ) or die $DBI::errstr ;

real	3m29.454s
user	0m3.554s
sys	0m9.643s

Type de connexion, directe.


my $DbHandler = DBI->connect($DbDsn, $userid, $password, { RaiseError => 1}) or die $DBI::errstr ;

real	3m18.110s
user	0m3.359s
sys	0m9.630s
  
 

 Ajouté la variable prédéfinis DBI_PROFILE=4 si vous êtes à un terminal Linux/Unix et vôtre programme perl qui utilise une base de données et complémentes les information de statistique:

       
DBI_PROFILE=4 DSMD5Process=perl DSPkgStatus=install DSDisplay=package DSSearch="^[a-zA-Z0-9]" DSIsRegExp=True DSLimit=0 ./DpkgSearchDb.pl

DBI::Profile: 209.896124s 99.48% (3083 calls) DpkgSearchDb.pl @ 2025-04-11 14:23:13
'STORE' =>
    0.000031s / 5 = 0.000006s avg (first 0.000009s, min 0.000002s, max 0.000009s)
'connect' =>
    0.001289s
'connected' =>
    0.000015s
'disconnect' =>
    0.000344s
'disconnect_all' =>
    0.000006s
'do' =>
    209.894439s / 3074 = 0.068281s avg (first 0.048222s, min 0.021930s, max 0.500559s)

 

En gros c'est plus rapide à l'insertion en mode direct. Nécessitant la présence de la confirmation de l'ajout, le temps de temporisations est ajouté à la transaction. De deux la fluidité est exprimé en utilisant la variable DBI_PROFILE=4 donnant la statistique de rendements des transactions, dans la section do avec le rapport de 0.068281 secondes la transaction.

L'ensemble des transactions se fait en mode AutoCommit et un mécanisme qui permet de d'activer le commit à la demande de l’envoi de la transaction. Le mode AutoCommit=1 ne permet qu'une seule transaction à la fois d'être passé à ce que Oracle et en PLSQL, AutoCommit sert pour un nombre de transaction à appliquer le Commit par défaut.

Alors en ré-analysant le merveilleux monde cryptique, qu'il y a à travers de nombreuses lignes de Awk et de Sed font l'équivoque d'avoir une expressions Sed qui capture le paquet, le processeurs et le statu, ce qui remonte à produire une application Perl beaucoup plus petite et efficiente, mais ne dépassera pas le même temps d’exécution que l'ensemble des méthodes utilisés pour développer DpkgSearch.pl qui démontre l'utilisation simplifié et possible de démontrer dans un temps simple.

Revisitant la section de mon livre d'expression régulière, le PCRE* et les séquences d'expression régulières de la Table 7 du chapitre Perl 5.8 me rappelle à même une expression je peux logé une condition de `match` ou d'un test conditionnel, y logé du code PERL tout étant associé à ce code Perl. Un endroit pour y loger et un $DbHandler->prepare  et utiliser les groupements et appelé le reste de la commande qui logera le restes des variable dans la commande SQL qui provoquera, le insert... N'est absolument pas supporté dans Sqlite et je contre vérifie et rencontre divers exceptions. Alors il faut se contenter d'un mécanisme unitaire.

Table à créer avec Sqlite ou toute structure SQL compatible:
 


CREATE TABLE "PackageInformation" (
	"PkID"	INTEGER NOT NULL UNIQUE,
	"PackageName"	TEXT NOT NULL,
	"PackageStatus"	TEXT NOT NULL,
	"ProcessorType"	TEXT NOT NULL DEFAULT 'None',
	PRIMARY KEY("PkID" AUTOINCREMENT)
)
 

 Ainsi que la table par défaut de SQLite.

       
CREATE TABLE sqlite_sequence(name,seq)
INSERT INTO sqlite_sequence( name, seq) VALUES ( )
       

 

Voici un exemple  d'application visuel permettant de comprendre et accéder à la base de données . Celle-ci à permis d’exécuter le décompte des paquets installé et retiré.


SELECT count(*), PackageStatus FROM PackageInformation GROUP BY PackageStatus ORDER BY PackageStatus DESC LIMIT 0, 49999
       
 

 

 

 

 

L'ensemble des fichiers sont accessible via l'URL de github.com 


 Incluant les tables d'insertion en mode SQL via des commande INSERT.

 

 

 

 

 

*.PCRE:Perl Compatible Regular Expression.

Posts les plus consultés de ce blog

What are you doing here, another one ?

 Yeah, that's another one piece of Intel Corporation. Not in is box, already plugged somewhere. And now it's not sold with a board and not only wrap into a bubble bag. It come with the plastic box, and at least.    At 5.59$CA, if one of my board ares misconfiguration and lacking BIOS update to support higher than 10 Mb of memory, for family e5 2650v4 with 10 core rather than 14 and less than 20 Mb of L3 cache and will probably report only 60% of the memory is inaccessible rather than yelling for 66% of the memory if this one calculate the L3 memory as internal memory error for being unable to count the edge. Yes it's true an e5-2650 own 30Mb of L3 cache while the e5-2630 own 25 Mb. Ok it's not also the theoretical 2 cores in less. I seriously believe the second one will fail, for not having around 6 to 8 core and up to 15 Mb of memory on L3 cache. But apparently there is so many option withing the bios it let you disable the core. And mean I do request to investigate fo...

South Park Season 6 episode 8, Getting entry from everywhere, and talk that purge.

 Inside Red Hot Catholic love: Mostly engaged in a quest with old paper that compromise Vatican, we can empirically see the spider invade the Vatican as web that is origin of the sin and may compromise a story long of a big king willing to eat whole religion itself and there is drawn a idea the king will someday enter in the Vatican to invade it. But it's not the detailed reason, two other sub-talk from parent and delegation of believe do something strange among South Park resident.   Starting at the seventh minutes where Cartman challenge everyone. He not only winning but  got a slang talk to inherit from a strange symptoms against talk .     And manifestation of that symptoms lets people refluxing theirs 'expelation' back from the exit to normal way we are using to eat or express themselves.   We call it intro-digestion symptoms and beware of what you are doing it take you by surprise.  Accordingly to Stan report or Cartman slang to get a pooh out of...

Does George Santos have receive money from Honest Gill.

 Back to five point of Honest Gill was :  76% of Americans say their representatives do a very bad job of listening to them. We used to aim big in this country – what happened? I’ll work hard to make sure 100% of Americans feel unrepresented.  I’ll make elections more representative for people who pay me. Ranked Choice Voting would disenfranchise campaign mega-donors and carelessly empower everyday Americans who don’t understand the wants and needs of the fundraising class. I’ll strengthen partisan gerry mandering. It’s better that politicians choose their voters, not the other way around, right ? Lobbyists spend $4 million per member of Congress. How are us poor Congress Members supposed to live on chump change? I pledge to continue to take gobs of cash from unscrupulous lobbyists. Just 4% of U.S. adults say the political system is working extremely or very well. Honest Gil will do his gosh darndest to get that number down to 0%.   To point 1, Honest Gil wi...