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...

Hottest Snapshoot from my ThF4_LaFe Hard-State Nuclear Holdrum

This is my ThF 4 + LaFe (α-Fe) Nuclear Holdrum ( more than quantic-one ), for it's hard-state design. It's the revealed reproduction from 1980, after seeing the images with my tiny eyes from M.Villeneuve having a snapshoot from the Psychiatric hives, or vault. It was forbidden to stole because it was not yet made at this moment... To reproduce the image on the picture, they use white paint on the Xenon tube on external side of the holdrum... In fact this is PTFE thread used and it have it's property... Ionisation from PTFE thread is mildly-helper driving photo-source like filter-to-filter of a « ridicule » quater-plate effect side of using Fluor in light filtering, while in high-energy and high velocity light it en-lighting prior to filter... In This case  it's good, we are dealing with Ultra-violet led PaInSe ( also know as Hard-state gamma-ray pulse led from Praseodymium/Indium with filter to throw down wavelength to UV region...   ). I can conclude it's 5 xeno...

My Xeon got afraid of it so it have run it out.

 Yes, there is an alternative to make Windows working. It's changing inside bios inside "CSM" section which have it and some item where left into "UEFI" and not auto-detect between "UEFI" and Legacy and does support Windows installation.    With such speed.   Belong to images it's my "DDR4 ECC" memory which are 2x 16 Gigabytes at 2133 Mhz that is actually running at 2194 Mhz, so close to processor speed which is 2.2Ghz. And it's only what is supported in overclock-ability the memory is pushed hard. Pushed at 103% of it's clock it might be the reason sometime it shut down silently or simply doing a task and shutdown. Except in Linux Min Xia installation it reboot before it end the loading of all the module. But exceptional it can last for 10 hours long formatting a Tera Byte ( out of it's 8 days of formatting ) and by using the Linux Mint installer of Xia ( which is the previous version of Linux Mint ). Apparently Virginia or W...